Skip to content

Commit

Permalink
Show current theme name
Browse files Browse the repository at this point in the history
Closes #119
  • Loading branch information
rashil2000 committed Jan 31, 2023
1 parent 62ede34 commit 0358dee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion winfetch.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -699,11 +699,12 @@ function info_terminal {
# ===== THEME =====
function info_theme {
$themeinfo = Get-ItemProperty -Path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize' -Name SystemUsesLightTheme, AppsUseLightTheme
$themename = (Get-ItemProperty -Path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes' -Name CurrentTheme).CurrentTheme.Split('\')[-1].Replace('.theme', '')
$systheme = if ($themeinfo.SystemUsesLightTheme) { "Light" } else { "Dark" }
$apptheme = if ($themeinfo.AppsUseLightTheme) { "Light" } else { "Dark" }
return @{
title = "Theme"
content = "System - $systheme, Apps - $apptheme"
content = "$themename (System: $systheme, Apps: $apptheme)"
}
}

Expand Down

0 comments on commit 0358dee

Please sign in to comment.