diff --git a/lib/config.ps1 b/lib/config.ps1 index ad9eafe..e2d450f 100644 --- a/lib/config.ps1 +++ b/lib/config.ps1 @@ -43,6 +43,7 @@ "pwsh" "resolution" "terminal" + # "theme" "cpu" "gpu" # "process" # takes some time diff --git a/src/posh-winfetch.ps1 b/src/posh-winfetch.ps1 index 781437f..4aa88b2 100644 --- a/src/posh-winfetch.ps1 +++ b/src/posh-winfetch.ps1 @@ -129,6 +129,7 @@ $baseConfig = @( "pkgs" "pwsh" "terminal" + "theme" "cpu" "gpu" "process" @@ -409,6 +410,18 @@ function info_terminal { } +# ===== THEME ===== +function info_theme { + $themeinfo = Get-ItemProperty -Path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize' -Name SystemUsesLightTheme, AppsUseLightTheme + $systheme = if ($themeinfo.SystemUsesLightTheme) { "Light" } else { "Dark" } + $apptheme = if ($themeinfo.AppsUseLightTheme) { "Light" } else { "Dark" } + return @{ + title = "Theme" + content = "System - $systheme, Apps - $apptheme" + } +} + + # ===== CPU/GPU ===== function info_cpu { return @{