Skip to content

Commit a1b5f90

Browse files
Merge pull request #1021 from ondrejholan/master
Toggle Windows dark mode
2 parents f717e4b + e1460c8 commit a1b5f90

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Required parameters:
2+
# @raycast.schemaVersion 1
3+
# @raycast.title Toggle System Appearance
4+
# @raycast.mode silent
5+
# @raycast.packageName Toggle System Appearance
6+
7+
# Optional parameters:
8+
# @raycast.platform windows
9+
# @raycast.icon 🌑
10+
# @raycast.iconDark 🌕
11+
# @raycast.description Toggle the system appearance, between light and dark mode. Works only for Windows platform.
12+
13+
# Documentation:
14+
# @raycast.author Ondrej Holan
15+
# @raycast.authorURL https://github.com/ondrejholan
16+
17+
# @raycast.author Luke Humberdross
18+
# @raycast.authorURL https://github.com/lukejjh
19+
20+
$k = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
21+
$v = (Get-ItemProperty -Path $k).SystemUsesLightTheme -bxor 1
22+
23+
Set-ItemProperty -Path $k -Name "SystemUsesLightTheme" -Value $v
24+
Set-ItemProperty -Path $k -Name "AppsUseLightTheme" -Value $v

0 commit comments

Comments
 (0)