aboutsummaryrefslogtreecommitdiffstats
path: root/.config/herbstluftwm
diff options
context:
space:
mode:
authorkatherine <shmibs@shmibbles.me>2016-02-01 23:33:54 -0700
committerkatherine <shmibs@shmibbles.me>2016-02-01 23:33:54 -0700
commit97becb02d2aa821d14077c3f0064000318a4ae71 (patch)
treee8a6bffb67444a7a9fbc463d3ef96324f08378f7 /.config/herbstluftwm
parentd6d77e40098945376c5daa0dc3fbf6760ef28bb0 (diff)
downloaddotfiles-97becb02d2aa821d14077c3f0064000318a4ae71.tar.gz
uniq doesn't work for some reason x-x
so confused. does it wait to output things when piping?
Diffstat (limited to '.config/herbstluftwm')
-rwxr-xr-x.config/herbstluftwm/panel.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/.config/herbstluftwm/panel.sh b/.config/herbstluftwm/panel.sh
index 890bc96..66ecdde 100755
--- a/.config/herbstluftwm/panel.sh
+++ b/.config/herbstluftwm/panel.sh
@@ -114,7 +114,9 @@ fields[6]=""
# date
fields[7]="$(update_date)"
-
+unique_line() {
+ awk '$0 != l { print ; l=$0 ; fflush(); }'
+}
######################
# EVENT GENERATORS #
@@ -151,7 +153,7 @@ event_mpd() {
fi
mpc idle player >/dev/null 2>&1
fi
- done > >(uniq)
+ done > >(unique_line)
}
event_stat() {
@@ -166,7 +168,7 @@ event_when() {
echo -e 'when\t1'
fi
sleep 10
- done > >(uniq)
+ done > >(unique_line)
}