From 27881477f716496146f4f263adc6332e5f1294f2 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Sun, 28 Apr 2019 19:45:02 +0200 Subject: Update configuration --- polybar/scripts/polybar/cal.sh | 6 ++++++ polybar/scripts/polybar/date.sh | 23 ++++++++++++++++++++++ polybar/scripts/polybar/theme.sh | 41 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100755 polybar/scripts/polybar/cal.sh create mode 100755 polybar/scripts/polybar/date.sh create mode 100644 polybar/scripts/polybar/theme.sh (limited to 'polybar/scripts') 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|_\(.\)|\1|' \ + | sed 's|_\(.\)|\1|' \ + | 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}" + + -- cgit v1.2.3