aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpolybar/scripts/polybar/cal.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/polybar/scripts/polybar/cal.sh b/polybar/scripts/polybar/cal.sh
index 96374f0..33f5f68 100755
--- a/polybar/scripts/polybar/cal.sh
+++ b/polybar/scripts/polybar/cal.sh
@@ -1,6 +1,13 @@
-#!/bin/sh
-cal=$(ncal -3 \
- | sed 's|_\(.\)|<span background="white" foreground="black">\1</span>|' \
+#!/bin/bash
+
+# Add a fake tty to get the day highlight
+# https://stackoverflow.com/a/32981392
+faketty () {
+ script -qfec "$(printf "%q " "$@")"
+}
+
+cal=$(faketty ncal -3 \
+ | sed 's|_\(.\)|<span background="white" foreground="red">\1</span>|' \
| sed 's|_\(.\)|<span background="white" foreground="black">\1</span>|' \
| sed 's|\s*$||')
-rofi -markup -width -55 -lines 8 -location 3 -e "$cal"
+rofi -markup -width -57 -lines 8 -location 3 -e "$cal"