[polybar] Add minimum priority to due items

Items displayed for being due are at least requiring a level 3 priority
(i.e. the lowest; any priority at all). Items without priority will not
be counted by polybar.
This commit is contained in:
Marty Oehme 2020-05-25 13:49:29 +02:00
parent 9b362cae38
commit 37072fee85
No known key found for this signature in database
GPG key ID: 0CCB0526EFB9611A
2 changed files with 5 additions and 2 deletions

View file

@ -212,6 +212,7 @@ time-alt = %H:%M
label = %date% %{T2} %{T-}%time%
; display information on currently playing track, allows simple track manipulation
; TODO: add album art display (on click?) - retrieved by playerctl metadata mpris:artUrl
[module/music]
type = custom/script
exec = $XDG_CONFIG_HOME/polybar/scripts/poly-mprisdisplay
@ -219,7 +220,6 @@ exec-if = type $XDG_CONFIG_HOME/polybar/scripts/poly-mprisdisplay
tail = true
click-left = kill -USR1 %pid%
click-right = kill -USR2 %pid%
; TODO: add album art display (on click?) - retrieved by playerctl metadata mpris:artUrl
; display information on remaining papers to read for the upcoming week
[module/papersdue]
@ -227,7 +227,10 @@ type = custom/script
exec = $XDG_CONFIG_HOME/polybar/scripts/poly-papersdue
exec-if = type bib-due
tail = true
; show list with high prio
click-left = exist rofi-bib-due normal "opening due papers" && rofi-bib-due -p1 -u $(date --date='fri this week' +%Y-%m-%d)
; show list with all
click-right = exist rofi-bib-due normal "opening due papers" && rofi-bib-due -p3 -u $(date --date='fri this week' +%Y-%m-%d)
; format-foreground = ${colors.primary}
format-prefix = " "
interval = 120

View file

@ -1,7 +1,7 @@
#!/usr/bin/env sh
while true; do
all="$(bib-due -u 'fri this week' | wc -l)"
all="$(bib-due -u 'fri this week' -p3 | wc -l)"
required="$(bib-due -u 'fri this week' -p1 | wc -l)"
# add polybar formatting to color required readings red