From d991318870204b498d661518f4db4960c442cd27 Mon Sep 17 00:00:00 2001 From: Nulo Date: Thu, 16 Feb 2023 15:13:29 -0300 Subject: [PATCH] sway: watch-dconf --- .config/sway/config | 1 + .local/bin/watch-dconf | 19 ++----------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/.config/sway/config b/.config/sway/config index c751f28..9e086c9 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -258,3 +258,4 @@ exec swaync exec kanshi exec waybar exec "nm-applet --indicator" +exec "~/.local/bin/watch-dconf" diff --git a/.local/bin/watch-dconf b/.local/bin/watch-dconf index b5ba641..6ce567f 100755 --- a/.local/bin/watch-dconf +++ b/.local/bin/watch-dconf @@ -2,7 +2,6 @@ . ~/.profile dconf_color_path=/org/gnome/desktop/interface/color-scheme -dconf_message_path=/org/gnome/shell/extensions/simple-message/message switch_helix() { sed -i 's/theme = ".*"/theme = "'$1'"/' ~/.config/helix/config.toml @@ -28,23 +27,9 @@ switch_from_dconf() { switch_from_dconf "$(dconf read "$dconf_color_path")" -(dconf watch "$dconf_color_path" | while read -r line; do +dconf watch "$dconf_color_path" | while read -r line; do theme="$(echo "$line" | grep -E "'.*'" | sed "s/'//g")" test -z "$theme" && continue switch_from_dconf "$theme" -done) & - -update_zeit() { - dconf write "$dconf_message_path" "'$(zeit tracking --no-colors)'" - echo updated zeit -} -update_zeit - -(busybox inotifyd - "$ZEIT_DB":c | while read -r; do - update_zeit -done) & - -while true; do - sleep 30 - update_zeit done +