flasheo gnome

This commit is contained in:
Cat /dev/Nulo 2023-02-16 14:34:36 -03:00
parent 8349c6e607
commit ed50836d92
4 changed files with 93 additions and 34 deletions

View file

@ -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"]

View file

@ -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

50
.local/bin/watch-dconf Executable file
View file

@ -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

View file

@ -0,0 +1,9 @@
[Desktop Entry]
Version=1.0
Name=watch-dconf
Exec=watch-dconf
Terminal=false
Type=Application
X-GNOME-Autostart-enabled=true