diff options
author | lonkaars <l.leblansch@gmail.com> | 2021-04-02 17:46:43 +0200 |
---|---|---|
committer | lonkaars <l.leblansch@gmail.com> | 2021-04-02 17:46:43 +0200 |
commit | 126aac27848795594f6ab6d3a67945da5ce16322 (patch) | |
tree | a0727d074e59818bc9a43d52a13706536ddf2fb2 /.local | |
parent | a5740b6a81b4e11f3176ce890b63a7faae649be0 (diff) |
zathura with light/dark mode script
Diffstat (limited to '.local')
-rwxr-xr-x | .local/share/bin/mode | 110 |
1 files changed, 70 insertions, 40 deletions
diff --git a/.local/share/bin/mode b/.local/share/bin/mode index 30d94d5..5668d3e 100755 --- a/.local/share/bin/mode +++ b/.local/share/bin/mode @@ -10,52 +10,81 @@ switch_xrdb() { switch_dunst() { read -r -d '' conf << EOF - frame_color = "$(get_color color1)" - - [urgency_low] - background = "$(get_color background)" - foreground = "$(get_color color1)" - timeout = 10 - - [urgency_normal] - background = "$(get_color background)" - foreground = "$(get_color foreground)" - timeout = 10 - - [urgency_critical] - background = "$(get_color color1)" - foreground = "$(get_color background)" - frame_color = "$(get_color color1)" - timeout = 0 +frame_color = "$(get_color color1)" + +[urgency_low] +background = "$(get_color background)" +foreground = "$(get_color color1)" +timeout = 10 + +[urgency_normal] +background = "$(get_color background)" +foreground = "$(get_color foreground)" +timeout = 10 + +[urgency_critical] +background = "$(get_color color1)" +foreground = "$(get_color background)" +frame_color = "$(get_color color1)" +timeout = 0 EOF echo "$conf" | cat ~/.config/dunst/base - > ~/.config/dunst/dunstrc } +switch_zathura() { + read -r -d '' conf << EOF +set default-bg "$(get_color background)" +set statusbar-bg "$(get_color background)" +set inputbar-bg "$(get_color background)" +set completion-highlight-fg "$(get_color background)" +set completion-bg "$(get_color background)" +set notification-error-fg "$(get_color background)" +set notification-warning-fg "$(get_color background)" +set notification-fg "$(get_color background)" +set recolor-lightcolor "$(get_color background)" + +set default-fg "$(get_color foreground)" +set inputbar-fg "$(get_color foreground)" +set completion-fg "$(get_color foreground)" +set statusbar-fg "$(get_color foreground)" +set recolor-darkcolor "$(get_color foreground)" + +set notification-error-bg "$(get_color color9)" +set notification-warning-bg "$(get_color color9)" +set completion-highlight-bg "$(get_color color9)" +set highlight-color "$(get_color color9)" + +set highlight-active-color "$(get_color color13)" +set notification-bg "$(get_color color13)" +EOF + echo "$conf" > ~/.config/zathura/colors +} + reload_terms() { read -r -d '' escape_msgs << EOF - \033]11;$(get_color background)\007 - \033]10;$(get_color foreground)\007 - \033]12;$(get_color foreground)\007 - \033]14;$(get_color background)\007 - \033]13;$(get_color foreground)\007 - \033]17;$(get_color color8)\007 - \033]708;$(get_color background)\007 - \033]4;0;$(get_color color0)\007 - \033]4;1;$(get_color color1)\007 - \033]4;2;$(get_color color2)\007 - \033]4;3;$(get_color color3)\007 - \033]4;4;$(get_color color4)\007 - \033]4;5;$(get_color color5)\007 - \033]4;6;$(get_color color6)\007 - \033]4;7;$(get_color color7)\007 - \033]4;8;$(get_color color8)\007 - \033]4;9;$(get_color color9)\007 - \033]4;10;$(get_color color10)\007 - \033]4;11;$(get_color color11)\007 - \033]4;12;$(get_color color12)\007 - \033]4;13;$(get_color color13)\007 - \033]4;14;$(get_color color14)\007 - \033]4;15;$(get_color color15)\007 +\033]11;$(get_color background)\007 +\033]10;$(get_color foreground)\007 +\033]12;$(get_color foreground)\007 +\033]14;$(get_color background)\007 +\033]13;$(get_color foreground)\007 +\033]17;$(get_color color8)\007 +\033]708;$(get_color background)\007 +\033]4;0;$(get_color color0)\007 +\033]4;1;$(get_color color1)\007 +\033]4;2;$(get_color color2)\007 +\033]4;3;$(get_color color3)\007 +\033]4;4;$(get_color color4)\007 +\033]4;5;$(get_color color5)\007 +\033]4;6;$(get_color color6)\007 +\033]4;7;$(get_color color7)\007 +\033]4;8;$(get_color color8)\007 +\033]4;9;$(get_color color9)\007 +\033]4;10;$(get_color color10)\007 +\033]4;11;$(get_color color11)\007 +\033]4;12;$(get_color color12)\007 +\033]4;13;$(get_color color13)\007 +\033]4;14;$(get_color color14)\007 +\033]4;15;$(get_color color15)\007 EOF escape_msgs=$(printf "$escape_msgs" | tr -d '\n') find /dev/pts -exec sh -c "printf \"$escape_msgs\n\" > {}" \; 2> /dev/null @@ -75,6 +104,7 @@ switch_cfgs() { switch_xrdb $1 switch_dunst $1 + switch_zathura $1 echo $1 > ~/.local/share/mode/active rm ~/.local/share/mode/dark ~/.local/share/mode/light |