diff options
| author | --global <ik.boikov.public@protonmail.com> | 2021-12-19 12:03:01 +0100 |
|---|---|---|
| committer | --global <ik.boikov.public@protonmail.com> | 2021-12-19 12:03:01 +0100 |
| commit | 25b613f755424edad38ab7616365bb618237b9fe (patch) | |
| tree | 46a18fb58fe6ae487be7568da93c813d7268e30e /wal | |
| parent | 6c02d1695a7d31e4a660f25df848f938f5f08da4 (diff) | |
migration to dwm; home cleanup
Diffstat (limited to 'wal')
| -rwxr-xr-x | wal/.config/wal/postrun | 34 | ||||
| -rw-r--r-- | wal/.config/wal/templates/dunstrc | 32 | ||||
| -rw-r--r-- | wal/.config/wal/templates/zathurarc | 35 |
3 files changed, 101 insertions, 0 deletions
diff --git a/wal/.config/wal/postrun b/wal/.config/wal/postrun new file mode 100755 index 0000000..2b1d6cb --- /dev/null +++ b/wal/.config/wal/postrun @@ -0,0 +1,34 @@ +#!/bin/bash + +echo "pywal started" + +dunstconf="${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc" +zathuraconf="${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc" + +source "${XDG_CACHE_HOME:-$HOME/.cache}/wal/colors.sh" + +mkdir -p "${dunstconf%/*}" "${zathuraconf%/*}" + +mv -n "$dunstconf" "$dunstconf.bak" +mv -n "$zathuraconf" "$zathuraconf.bak" + +ln -sf "${XDG_CACHE_HOME:-$HOME/.cache}/wal/dunstrc" "$dunstconf" +ln -sf "${XDG_CACHE_HOME:-$HOME/.cache}/wal/zathurarc" "$zathuraconf" + +fix_sequences() { + e=$'\e' + sequences=$(cat) + foreground_color="$(echo -e "${sequences}\c" | grep --color=never -Eo "${e}]10[^${e}\\\\]*?${e}\\\\" | grep --color=never -Eo "#[0-9A-Fa-f]{6}")" + background_color="$(echo -e "${sequences}\c" | grep --color=never -Eo "${e}]11[^${e}\\\\]*?${e}\\\\" | grep --color=never -Eo "#[0-9A-Fa-f]{6}")" + cursor_color="$(echo -e "${sequences}\c" | grep --color=never -Eo "${e}]12[^${e}\\\\]*?${e}\\\\" | grep --color=never -Eo "#[0-9A-Fa-f]{6}")" + + for term in /dev/pts/{0..9}*; do + echo -e "\e]4;256;${cursor_color}\a\c" > "${term}" 2>/dev/null + echo -e "\e]4;258;${background_color}\a\c" > "${term}" 2>/dev/null + echo -e "\e]4;259;${foreground_color}\a\c" > "${term}" 2>/dev/null + done +} + +fix_sequences <"${XDG_CACHE_HOME:-$HOME/.cache}/wal/sequences" + +pkill dunst; setsid -f dunst diff --git a/wal/.config/wal/templates/dunstrc b/wal/.config/wal/templates/dunstrc new file mode 100644 index 0000000..9178c3e --- /dev/null +++ b/wal/.config/wal/templates/dunstrc @@ -0,0 +1,32 @@ +[global] + monitor = 0 + follow = keyboard + width=370 + height=350 + geometry="500x70-0+18" + offset = 0x19 + padding = 5 + horizontal_padding = 5 + transparency = 15 + font = Liberation Mono 12 + format = "<b>%s</b>\n%b" + frame_width=5 + corner_radius=0 + +[urgency_low] + background = "{color0}" # color0 + foreground = "{color7}" # color4 + frame_color = "{color7}" # color0 + timeout = 3 + +[urgency_normal] + background = "{color0}" # color0 + foreground = "{color4}" # color4 + frame_color = "{color4}" # color4 + timeout = 5 + +[urgency_critical] + background = "{color4}" # color4 + foreground = "{color0}" # color0 + frame_color = "{color4}" # color4 + timeout = 10 diff --git a/wal/.config/wal/templates/zathurarc b/wal/.config/wal/templates/zathurarc new file mode 100644 index 0000000..a12bbd3 --- /dev/null +++ b/wal/.config/wal/templates/zathurarc @@ -0,0 +1,35 @@ +set sandbox none +set statusbar-h-padding 0 +set statusbar-v-padding 0 +set page-padding 1 +set selection-clipboard clipboard +map u scroll half-up +map d scroll half-down +map D toggle_page_mode +map r reload +map R rotate +map K zoom in +map J zoom out +map i recolor +map p print + +set default-bg "{background}" +set default-fg "{foreground}" +set statusbar-bg "{background}" +set statusbar-fg "{foreground}" +set inputbar-bg "{background}" +set inputbar-fg "{foreground}" +set notification-bg "{background}" +set notification-fg "{foreground}" +set notification-error-bg "{background}" +set notification-error-fg "{foreground}" +set notification-warning-bg "{background}" +set notification-warning-fg "{foreground}" +set highlight-color "{color3}" +set highlight-active-color "{color4}" +set completion-bg "{color3}" +set completion-fg "{color4}" +set completion-highlight-bg "{color3}" +set completion-highlight-fg "{color4}" +set recolor-lightcolor "{background}" +set recolor-darkcolor "{foreground}" |
