summaryrefslogtreecommitdiff
path: root/.local/bin
diff options
context:
space:
mode:
authorAndrew Guschin <guschin@altlinux.org>2024-08-13 18:58:13 +0400
committerAndrew Guschin <guschin@altlinux.org>2024-08-13 18:58:13 +0400
commit5452a15aafa411e4e3cb8f181068d64d3ec20861 (patch)
tree3cbdbf85293516e5d3d53455413f38863a4b0b8d /.local/bin
parentc1e4cb7cd1441bac1130d6b1c51803fec00b2834 (diff)
add switch-theme script and add shortcut for it in Hyprland
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/switch-theme13
1 files changed, 13 insertions, 0 deletions
diff --git a/.local/bin/switch-theme b/.local/bin/switch-theme
new file mode 100755
index 0000000..e0aab25
--- /dev/null
+++ b/.local/bin/switch-theme
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -efu
+
+readonly current=$(gsettings get org.gnome.desktop.interface color-scheme)
+case $current in
+ "'prefer-light'")
+ gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' ;;
+ "'prefer-dark'")
+ gsettings set org.gnome.desktop.interface color-scheme 'prefer-light' ;;
+ *)
+ printf "Unknown value '$current'" ;;
+esac