add dark/light mode scripts

This commit is contained in:
Michael
2021-11-02 15:50:40 +00:00
parent f58cb9d512
commit 52448f0f21
2 changed files with 18 additions and 0 deletions

9
enable-darkmode.sh Normal file
View File

@@ -0,0 +1,9 @@
!/bin/bash
sudo -u $(stat -f "%Su" /dev/console) /bin/sh <<'END'
osascript <<EOD
tell application "System Events"
tell appearance preferences
set dark mode to true # Can be one of: true, false, not dark
end tell
end tell
EOD

9
enable-lightmode.sh Normal file
View File

@@ -0,0 +1,9 @@
!/bin/bash
sudo -u $(stat -f "%Su" /dev/console) /bin/sh <<'END'
osascript <<EOD
tell application "System Events"
tell appearance preferences
set dark mode to false # Can be one of: true, false, not dark
end tell
end tell
EOD