From 0d905216c8c482cb69baa059318bfc54cd4480e3 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 14 Aug 2026 01:57:45 +0000 Subject: [PATCH] polybar: open Google Calendar on date-module click Wrap the date module's time string in a %{A1} action tag pointing at a new calendar.sh, which launches the Google Calendar PWA when a browser has installed one and falls back to calendar.google.com otherwise. PWA desktop entries are found by Name= rather than filename, since browsers name them --.desktop. --- .../polybar/shades/modules.ini | 4 +++- .../polybar/shades/scripts/calendar.sh | 22 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100755 desktop-environment/polybar/shades/scripts/calendar.sh diff --git a/desktop-environment/polybar/shades/modules.ini b/desktop-environment/polybar/shades/modules.ini index 9d103f1..87bfe9f 100644 --- a/desktop-environment/polybar/shades/modules.ini +++ b/desktop-environment/polybar/shades/modules.ini @@ -581,7 +581,9 @@ interval = 10.0 ;;date = %Y-%m-%d% ; Optional time format -time = " %a, %d %b %Y" +; Wrapped in a click action (%% escapes % for strftime): left click opens +; the Google Calendar PWA (or the site, if none is installed). +time = "%%{A1:~/.config/polybar/shades/scripts/calendar.sh &:} %a, %d %b %Y%%{A}" ; Available tags: ;