Improve toggle_theme
This commit is contained in:
parent
848c02e77f
commit
fa2854e376
1 changed files with 14 additions and 0 deletions
14
toggle_theme
14
toggle_theme
|
|
@ -36,9 +36,23 @@
|
||||||
"switch"
|
"switch"
|
||||||
(let [switch-to (next-theme)
|
(let [switch-to (next-theme)
|
||||||
gnome-theme ((:gnome themes) switch-to)]
|
gnome-theme ((:gnome themes) switch-to)]
|
||||||
|
;; https://askubuntu.com/questions/1464937/inconsistent-dark-theme-for-gtk-apps-on-23-04
|
||||||
|
;;
|
||||||
|
;; $ gsettings get org.gnome.desktop.interface color-scheme
|
||||||
|
;; 'prefer-dark'
|
||||||
|
;; $ gsettings get org.gnome.desktop.interface gtk-theme
|
||||||
|
;; 'Yaru-dark'
|
||||||
|
;; $ gsettings get org.gnome.desktop.wm.preferences theme
|
||||||
|
;; 'Yaru-dark'
|
||||||
|
|
||||||
|
;; [["org.gnome.desktop.interface" "gtk-theme"]
|
||||||
|
;; ["org.gnome.desktop.wm.preferences" "theme"]]
|
||||||
|
|
||||||
|
|
||||||
(run!
|
(run!
|
||||||
#(sh "gsettings" "set" "org.gnome.desktop.interface" (str % "-theme") gnome-theme)
|
#(sh "gsettings" "set" "org.gnome.desktop.interface" (str % "-theme") gnome-theme)
|
||||||
theme-preferences)
|
theme-preferences)
|
||||||
|
(sh "gsettings" "set" "org.gnome.desktop.interface" "color-scheme" (name (if (= :dark (current-theme)) :prefer-light :prefer-dark)))
|
||||||
|
|
||||||
(sh "emacsclient" "-e" (str "(load-theme '" ((:emacs themes) switch-to) ")"))
|
(sh "emacsclient" "-e" (str "(load-theme '" ((:emacs themes) switch-to) ")"))
|
||||||
nil))
|
nil))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue