From 65915ec6c0311ef8a0af24bfe82bd10f338afa86 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Sun, 18 Aug 2019 15:34:42 +0200 Subject: Update calendar script --- polybar/scripts/polybar/cal.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'polybar') diff --git a/polybar/scripts/polybar/cal.sh b/polybar/scripts/polybar/cal.sh index 33f5f68..a69d088 100755 --- a/polybar/scripts/polybar/cal.sh +++ b/polybar/scripts/polybar/cal.sh @@ -6,8 +6,10 @@ faketty () { script -qfec "$(printf "%q " "$@")" } +# Get the max line width +width=$(ncal -3 | wc -L) + cal=$(faketty ncal -3 \ - | sed 's|_\(.\)|\1|' \ - | sed 's|_\(.\)|\1|' \ + | sed 's|_\(.\)|\1|g' \ | sed 's|\s*$||') -rofi -markup -width -57 -lines 8 -location 3 -e "$cal" +rofi -font "mono 9" -markup -width -"${width}" -lines 8 -location 3 -e "${cal}" -- cgit v1.2.3