eww: Add color-scheme switch button
This commit is contained in:
7
tree/.local/bin/get-color-scheme.tpl
Executable file
7
tree/.local/bin/get-color-scheme.tpl
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
{% if light %}
|
||||
echo light
|
||||
{% else %}
|
||||
echo dark
|
||||
{% end %}
|
||||
21
tree/.local/bin/set-color-scheme
Executable file
21
tree/.local/bin/set-color-scheme
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/env fish
|
||||
|
||||
switch $argv[1]
|
||||
case 'light'
|
||||
# configure terminal stuff with light theme
|
||||
dotfiles light
|
||||
|
||||
# change gtk theme
|
||||
gsettings set org.gnome.desktop.interface color-scheme prefer-light
|
||||
|
||||
case 'dark'
|
||||
# configure terminal stuff with dark theme
|
||||
dotfiles
|
||||
|
||||
# change gtk theme
|
||||
gsettings set org.gnome.desktop.interface color-scheme prefer-dark
|
||||
|
||||
case '*'
|
||||
echo "usage: set-color-scheme <dark|light>"
|
||||
exit 1
|
||||
end
|
||||
Reference in New Issue
Block a user