From e4306e5435eef76bad7fa9b3b909362304a8a47e Mon Sep 17 00:00:00 2001 From: skylar Date: Sat, 28 Nov 2026 05:59:53 -0800 Subject: luxnox: one palette for light and dark themes palette.toml drives kitty, the dwl desktop (dwl, fuzzel, swaync, wob, wmenu), GTK, Qt, the console and Emacs; luxnox-toggle switches lux and nox. Co-Authored-By: Claude Opus 5.5 --- bin/luxnox-toggle | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 bin/luxnox-toggle (limited to 'bin/luxnox-toggle') diff --git a/bin/luxnox-toggle b/bin/luxnox-toggle new file mode 100755 index 0000000..eb727d3 --- /dev/null +++ b/bin/luxnox-toggle @@ -0,0 +1,18 @@ +#!/bin/sh +# Flip the system color scheme between dark (nox) and light (lux). +# Apps that follow org.gnome.desktop.interface color-scheme (kitty via the +# portal, GTK, later Emacs) switch on their own. +# luxnox-toggle [dark|light] +key=org.gnome.desktop.interface +# Always the plain "user" dconf database, which the GTK portal reads. A shell +# started from a session that inherited COSMIC's DCONF_PROFILE would otherwise +# write to COSMIC's database and nothing would change. +unset DCONF_PROFILE +case "${1:-}" in + dark) want=prefer-dark ;; + light) want=prefer-light ;; + "") [ "$(gsettings get $key color-scheme)" = "'prefer-dark'" ] \ + && want=prefer-light || want=prefer-dark ;; + *) echo "usage: luxnox-toggle [dark|light]" >&2; exit 2 ;; +esac +gsettings set $key color-scheme "$want" -- cgit v1.2.3