From 4681156a8987a3bbaff3998c67ff77d234acfeb7 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 8 May 2020 12:07:23 +0200 Subject: [PATCH 01/17] [script] Add simple due script for bibtex file Scrapes a bibtex file for 'due' field, and outputs all found entries with their priority and sorted for date. --- bibtex/.local/bin/bib_due | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 bibtex/.local/bin/bib_due diff --git a/bibtex/.local/bin/bib_due b/bibtex/.local/bin/bib_due new file mode 100755 index 0000000..aed3530 --- /dev/null +++ b/bibtex/.local/bin/bib_due @@ -0,0 +1,7 @@ +#!/usr/bin/env sh +# shows due entries of bibtex file passed in +# HACK: brittle and hacky! +# +# looks for 'due' entries in bibfile and gets their + +awk '/due|^@\w|prio[123]/' ORS=' ' "$1" | sed -E 's/ (@\w)/\n\1/g' | grep due | sed 's/ //g' | sed -E 's/^@\w+\{(\w+),due=\{(.+?)\},.*,priority=\{(\w)+\}.*$/\2 \3 \1/' | sort From 552d120856302def16c1872a2cc7244a8841c7e9 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 8 May 2020 12:31:14 +0200 Subject: [PATCH 02/17] [polybar] Add due papers display Added simple numerical display for papers that are upcoming and due. Will display ALL due papers, and not distinguish between soon / at some point yet. Can not yet be interacted with. --- polybar/.config/polybar/config | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config index 4222ae0..1ba82c4 100644 --- a/polybar/.config/polybar/config +++ b/polybar/.config/polybar/config @@ -17,10 +17,8 @@ ;========================================================== [colors] -;background = ${xrdb:color0:#222} background = ${xrdb:background} background-alt = ${xrdb:color8} -;foreground = ${xrdb:color7:#222} foreground = ${xrdb:foreground} foreground-alt = ${xrdb:color3} primary = ${xrdb:color1} @@ -56,7 +54,7 @@ padding-right = 0 module-margin-left = 2 modules-left = workspaces -modules-center = mprisdisplay date +modules-center = mprisdisplay date papersdue modules-right = networkspeed archupdates cpu temp backlight volume battery ; do not use offsets for the bar, would only work with override-redirect ; and will mess up tray https://github.com/polybar/polybar/issues/1355 @@ -85,7 +83,7 @@ fixed-center = true ; See the Fonts wiki page for more details font-0 = Comic Neue font-1 = NotoSans -font-2 = Iosevka:size=18 +font-2 = Iosevka:size=18;1 cursor-click = pointer @@ -209,13 +207,23 @@ date-alt = %A, %d %B %Y (W %V) time-alt = %H:%M label = %date% %{T2} %{T-}%time% +[module/papersdue] +type = custom/script +exec = $XDG_BIN_HOME/bib_due $BIBFILE | wc -l +exec-if = type $XDG_BIN_HOME/bib_due +format-foreground = ${colors.primary} +format-padding = 2 +format-prefix = " " +interval = 2 + [module/archupdates] type = custom/script exec = $XDG_CONFIG_HOME/polybar/scripts/poly-archupdates interval = 600 format =