diff --git a/.config/helix/config.toml b/.config/helix/config.toml index 2a94f68..6250e39 100644 --- a/.config/helix/config.toml +++ b/.config/helix/config.toml @@ -1,6 +1,7 @@ -# theme = "monokai_pro" -# theme = "everforest_light" -theme = "autumn_night" +theme = "emacs" [editor.lsp] display-messages = true + +[keys.normal] +C-r = [":config-reload"] diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index 86e6c7a..278ecdb 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -9,51 +9,50 @@ map ctrl+shift+n new_os_window_with_cwd ## license: MIT ## upstream: https://github.com/rose-pine/kitty/blob/main/dist/rose-pine.conf ## blurb: All natural pine, faux fur and a bit of soho vibes for the classy minimalist - -foreground #e0def4 -background #191724 -selection_foreground #e0def4 -selection_background #403d52 - -cursor #524f67 -cursor_text_color #e0def4 - -url_color #c4a7e7 - -active_tab_foreground #e0def4 -active_tab_background #26233a -inactive_tab_foreground #6e6a86 -inactive_tab_background #191724 +# foreground #e0def4 +# background #191724 +# selection_foreground #e0def4 +# selection_background #403d52 +# cursor #524f67 +# cursor_text_color #e0def4 +# url_color #c4a7e7 +# active_tab_foreground #e0def4 +# active_tab_background #26233a +# inactive_tab_foreground #6e6a86 +# inactive_tab_background #191724 # black -color0 #26233a -color8 #6e6a86 +# color0 #26233a +# color8 #6e6a86 # red -color1 #eb6f92 -color9 #eb6f92 +# color1 #eb6f92 +# color9 #eb6f92 # green -color2 #31748f -color10 #31748f +# color2 #31748f +# color10 #31748f # yellow -color3 #f6c177 -color11 #f6c177 +# color3 #f6c177 +# color11 #f6c177 # blue -color4 #9ccfd8 -color12 #9ccfd8 +# color4 #9ccfd8 +# color12 #9ccfd8 # magenta -color5 #c4a7e7 -color13 #c4a7e7 +# color5 #c4a7e7 +# color13 #c4a7e7 # cyan -color6 #ebbcba -color14 #ebbcba +# color6 #ebbcba +# color14 #ebbcba # white -color7 #e0def4 -color15 #e0def4 +# color7 #e0def4 +# color15 #e0def4 + + +include themes.conf diff --git a/.local/bin/watch-dconf b/.local/bin/watch-dconf new file mode 100755 index 0000000..b5ba641 --- /dev/null +++ b/.local/bin/watch-dconf @@ -0,0 +1,50 @@ +#!/bin/sh +. ~/.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 +} +switch_kitty() { + kitty +kitten themes --reload-in=all --config-file-name=themes.conf "$1" +} +light() { + switch_helix "emacs" + switch_kitty "Modus Operandi" +} +dark() { + switch_helix "autumn_night" + switch_kitty "Modus Vivendi" +} +switch_from_dconf() { + if test "$1" = prefer-dark; then + dark + else + light + fi +} + +switch_from_dconf "$(dconf read "$dconf_color_path")" + +(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 diff --git a/.local/share/applications/watch-dconf.desktop b/.local/share/applications/watch-dconf.desktop new file mode 100644 index 0000000..f087b94 --- /dev/null +++ b/.local/share/applications/watch-dconf.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=watch-dconf +Exec=watch-dconf +Terminal=false +Type=Application +X-GNOME-Autostart-enabled=true + +