hlfw.ca

hwwm

Download patch

ref: f08bf58e15523d1504dc630c9bf5c8bcf6a2e1b7
parent: 3b3dad20e1970bc2c81890070500b3a0d8db8df1
author: Halfwit <michaelmisch1985@gmail.com>
date: Mon Mar 19 00:59:56 PDT 2018

Initialize some data, force a redraw for lemonbar

Signed-off-by: Halfwit <michaelmisch1985@gmail.com>

--- a/inotifybar
+++ b/inotifybar
@@ -25,10 +25,17 @@
 
 battery &
 
+# Initialize some data
+test -f "$statusdir/rss" && read -r rss < "$statusdir/rss"
+test -f "$statusdir/git" && read -r git < "$statusdir/git"
+test -f "$statusdir/media" && read -r media < "$statusdir/media"
+
 barrun() {
 inotifywait -qme close_write --format %f "$statusdir" | while read -r file; do
 	if read -r -- "$file" < "$statusdir/$file"; then
 		printf -- ' %s %%{c} %s %%{r} %s%s%s \n' "$batt" "$groups" "$rss" "$git" "$media"
+		# We inexplicably need to force a redraw here
+		/usr/local/share/hwwm/wshuf | xargs -n 5 wtp
 	fi
 done | lemonbar -F '#282828' -B '#787878' -d -b -f "DejaVu Book:size=9.5" -f "Symbola:size=9.5" -f "FreeSans:size=9.5"
 }