Commit 80d7cef7 authored by Joseph Durel's avatar Joseph Durel

Add macOS Light/Dark theme detection

parent 3344bbf8
...@@ -926,14 +926,21 @@ get_wm_theme() { ...@@ -926,14 +926,21 @@ get_wm_theme() {
;; ;;
"Quartz Compositor") "Quartz Compositor")
wm_theme="$(PlistBuddy -c "Print AppleAquaColorVariant" \ global_preferences="${HOME}/Library/Preferences/.GlobalPreferences.plist"
"${HOME}/Library/Preferences/.GlobalPreferences.plist")" wm_theme="$(PlistBuddy -c "Print AppleInterfaceStyle" "$global_preferences")"
wm_theme_color="$(PlistBuddy -c "Print AppleAquaColorVariant" "$global_preferences")"
if [[ -z "$wm_theme" ]] || ((wm_theme == 1)); then if [[ -z "$wm_theme" ]]; then
wm_theme="Blue" wm_theme="Light"
fi
if [[ -z "$wm_theme_color" ]] || ((wm_theme_color == 1)); then
wm_theme_color="Blue"
else else
wm_theme="Graphite" wm_theme_color="Graphite"
fi fi
wm_theme="$wm_theme_color ($wm_theme)"
;; ;;
*"Explorer") *"Explorer")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment