From b4c8030ce8e2aa712ef5d09154800697c57efa88 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 May 2020 21:43:59 +0200 Subject: [PATCH] [polybar] Use bib-due date filter Utilize the date filter option to display upcoming readings until the end of the week and no further. Needs gnu date utility. --- polybar/.config/polybar/config | 4 ++-- polybar/.local/bin/polybar-launch | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config index 6164c24..b868ab5 100644 --- a/polybar/.config/polybar/config +++ b/polybar/.config/polybar/config @@ -224,9 +224,9 @@ click-right = kill -USR2 %pid% ; display information on remaining papers to read for the upcoming week [module/papersdue] type = custom/script -exec = bib-due | wc -l +exec = bib-due -u $(date --date='fri this week' +%Y-%m-%d) | wc -l exec-if = type bib-due -click-left = exist rofi-bib-due normal && rofi-bib-due +click-left = exist rofi-bib-due normal "opening due papers" && rofi-bib-due -u $(date --date='fri this week' +%Y-%m-%d) format-foreground = ${colors.primary} format-prefix = "" interval = 120 diff --git a/polybar/.local/bin/polybar-launch b/polybar/.local/bin/polybar-launch index c718d8c..7aa306b 100755 --- a/polybar/.local/bin/polybar-launch +++ b/polybar/.local/bin/polybar-launch @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# force start or restart (all) polybar instances +# if ipc is enabled, can be replaced with `polybar-msg cmd restart`, provided polybar is not stuck # Terminate already running bar instances killall -q polybar