diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2019-04-28 19:45:02 +0200 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2019-04-28 19:45:02 +0200 |
commit | 27881477f716496146f4f263adc6332e5f1294f2 (patch) | |
tree | 2858a151c53b842594369d630bb5257b8a89b275 /polybar/scripts | |
parent | 4e3bbbc43654f4c4d4e992d9c09bc270572f6032 (diff) |
Update configuration
Diffstat (limited to 'polybar/scripts')
-rwxr-xr-x | polybar/scripts/polybar/cal.sh | 6 | ||||
-rwxr-xr-x | polybar/scripts/polybar/date.sh | 23 | ||||
-rw-r--r-- | polybar/scripts/polybar/theme.sh | 41 |
3 files changed, 70 insertions, 0 deletions
diff --git a/polybar/scripts/polybar/cal.sh b/polybar/scripts/polybar/cal.sh new file mode 100755 index 0000000..96374f0 --- /dev/null +++ b/polybar/scripts/polybar/cal.sh @@ -0,0 +1,6 @@ +#!/bin/sh +cal=$(ncal -3 \ + | sed 's|_\(.\)|<span background="white" foreground="black">\1</span>|' \ + | sed 's|_\(.\)|<span background="white" foreground="black">\1</span>|' \ + | sed 's|\s*$||') +rofi -markup -width -55 -lines 8 -location 3 -e "$cal" diff --git a/polybar/scripts/polybar/date.sh b/polybar/scripts/polybar/date.sh new file mode 100755 index 0000000..698b15f --- /dev/null +++ b/polybar/scripts/polybar/date.sh @@ -0,0 +1,23 @@ +t=0 + +draw() { + if [ $t -eq 0 ]; then + date +%H:%M + else + date +"%d %b %H:%M" + fi +} + +toggle() { + t=$(((t + 1) % 2)); + draw +} + + +trap "toggle" USR1 + +while true; do + draw + sleep 60 & + wait +done diff --git a/polybar/scripts/polybar/theme.sh b/polybar/scripts/polybar/theme.sh new file mode 100644 index 0000000..8822dc2 --- /dev/null +++ b/polybar/scripts/polybar/theme.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +. "${HOME}/.cache/wal/colors.sh" +polybar_conf=~/.config/polybar/colors.ini +echo "color0=$color0" > "${polybar_conf}" +echo "color1=$color1" >> "${polybar_conf}" +echo "color2=$color2" >> "${polybar_conf}" +echo "color3=$color3" >> "${polybar_conf}" +echo "color4=$color4" >> "${polybar_conf}" +echo "color5=$color5" >> "${polybar_conf}" +echo "color6=$color6" >> "${polybar_conf}" +echo "color7=$color7" >> "${polybar_conf}" +echo "color8=$color8" >> "${polybar_conf}" +echo "color9=$color9" >> "${polybar_conf}" +echo "color10=$color10" >> "${polybar_conf}" +echo "color11=$color11" >> "${polybar_conf}" +echo "color12=$color12" >> "${polybar_conf}" +echo "color13=$color13" >> "${polybar_conf}" +echo "color14=$color14" >> "${polybar_conf}" +echo "color15=$color15" >> "${polybar_conf}" + + +xressource_conf=~/.config/xressource_colors +echo "#define _color0 $color0" > "${xressource_conf}" +echo "#define _color1 $color1" >> "${xressource_conf}" +echo "#define _color2 $color2" >> "${xressource_conf}" +echo "#define _color3 $color3" >> "${xressource_conf}" +echo "#define _color4 $color4" >> "${xressource_conf}" +echo "#define _color5 $color5" >> "${xressource_conf}" +echo "#define _color6 $color6" >> "${xressource_conf}" +echo "#define _color7 $color7" >> "${xressource_conf}" +echo "#define _color8 $color8" >> "${xressource_conf}" +echo "#define _color9 $color9" >> "${xressource_conf}" +echo "#define _color10 $color10" >> "${xressource_conf}" +echo "#define _color11 $color11" >> "${xressource_conf}" +echo "#define _color12 $color12" >> "${xressource_conf}" +echo "#define _color13 $color13" >> "${xressource_conf}" +echo "#define _color14 $color14" >> "${xressource_conf}" +echo "#define _color15 $color15" >> "${xressource_conf}" + + |