commit ef0e82319d4f8fe13fc8b9358d15ed35c9efe4ec
parent 486b3007d1a625efb132d614b69ff047b7a5ad5c
Author: mjkloeckner <martinjkloeckner@gmail.com>
Date: Fri, 12 May 2023 20:25:32 -0300
cleanup code and add comments
Diffstat:
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/sys-dark-scheme b/sys-dark-scheme
@@ -2,6 +2,7 @@
# Set system color scheme to dark
+# requires neovim-remote
update_vim() {
instances=$(nvr --serverlist)
for instance in $instances; do
@@ -20,12 +21,13 @@ update_vim() {
rm -rf $HOME/.config/scheme/light ||: &
touch $HOME/.config/scheme/dark &
+# Set gnome applications to dark scheme
gsettings set org.gnome.desktop.interface color-scheme prefer-dark &
-
# Requires st patched
pidof st | xargs kill -USR1 > /dev/null 2>&1 &
+# requires a theme named default-dark in kitty schemes folder
kitty +kitten themes --reload-in=all default-dark &
update_vim &
@@ -46,7 +48,7 @@ perl -i -0 -pe\
"$HOME/.config/kdeglobals" &
perl -i -pe 's/(?<=Net\/ThemeName ")Adwaita(?=")/Adwaita-dark/'\
- "/home/mk/.config/xsettingsd/xsettingsd.conf"
+ "$HOME/.config/xsettingsd/xsettingsd.conf"
kill -HUP $(pidof xsettingsd)
wait
diff --git a/sys-light-scheme b/sys-light-scheme
@@ -15,16 +15,19 @@ update_vim() {
# cp -f /home/mk/.config/scheme/lockscreen-light-bg /home/mk/.config/scheme/lockscreen-bg
+# update file flag
[ ! -d $HOME/.config/scheme ] && mkdir $HOME/.config/scheme &
-# update file flag
rm -rf $HOME/.config/scheme/dark ||: &
touch $HOME/.config/scheme/light &
+# Set gnome applications to light scheme
gsettings set org.gnome.desktop.interface color-scheme prefer-light &
+# Requires st patched
pidof st | xargs kill -USR2 > /dev/null 2>&1 &
+# requires a theme named default-light in kitty schemes folder
kitty +kitten themes --reload-in=all default-light &
update_vim &