hlfw.ca

hwwm

Download patch

ref: 385abc8d02c1586d9ef3813e8620b983de974b36
parent: 5d0a91ab4f56206ab2f815b46d8b57cc77e9cb81
author: Halfwit <michaelmisch1985@gmail.com>
date: Tue Aug 28 13:36:11 PDT 2018

Going through changes. (The exec was a bad idea)

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

--- a/inotifybar
+++ b/inotifybar
@@ -8,19 +8,21 @@
 
 reload() {	
 	kill -INT $$
-	exec /usr/local/bin/inotifybar
+	barrun
 }
 
-## These are all set by external processes. Time, batt, and rss are updated through cron jobs. Git is updated through git hooks, and media is updated through mpv/mpg123/ogg123 hooks.
-# 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"
-test -f "$statusdir/time" && read -r time < "$statusdir/time"
-test -f "$statusdir/batt" && read -r batt < "$statusdir/batt"
+barrun() {
 
+	## These are all set by external processes. Time, batt, and rss are updated through cron jobs. Git is updated through git hooks, and media is updated through mpv/mpg123/ogg123 hooks.
+	# 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"
+	test -f "$statusdir/time" && read -r time < "$statusdir/time"
+	test -f "$statusdir/batt" && read -r batt < "$statusdir/batt"
+
+
 # This will fail unless you have something set for *desktop in your Xresources!
-barrun() {
 	background="$(xrdb -query | awk '/background/{print $NF}')"
 	foreground="$(xrdb -query | awk '/desktop/{print $NF}')"
 	inotifywait -qme close_write --format %f "$statusdir" | while read -r file; do