2026-08-03 14:30:55 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
|
|
# Triggered by <Control><Alt>d
|
|
|
|
|
# as defined in [org/gnome/settings-daemon/plugins/media-keys]
|
|
|
|
|
# in ~/.config/gnome-settings/key-bindings.ini
|
|
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Interface=org.gnome.desktop.interface
|
|
|
|
|
Background=org.gnome.desktop.background
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Keep in sync with "primary-color" in [org/gnome/desktop/background]
|
|
|
|
|
DARK_COLOR='#054A55'
|
|
|
|
|
LIGHT_COLOR='#DEEDF1'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$(gsettings get $Interface color-scheme)" = "'prefer-dark'" ]; then
|
|
|
|
|
|
|
|
|
|
gsettings set $Interface color-scheme 'prefer-light'
|
2026-08-14 14:31:41 +02:00
|
|
|
# gsettings set $Background primary-color "$LIGHT_COLOR"
|
|
|
|
|
# gsettings set $Background secondary-color "$LIGHT_COLOR"
|
2026-08-03 14:30:55 +02:00
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
gsettings set $Interface color-scheme 'prefer-dark'
|
2026-08-14 14:31:41 +02:00
|
|
|
# gsettings set $Background primary-color "$DARK_COLOR"
|
|
|
|
|
# gsettings set $Background secondary-color "$DARK_COLOR"
|
2026-08-03 14:30:55 +02:00
|
|
|
|
|
|
|
|
fi
|