diff options
author | katherine <shmibs@shmibbles.me> | 2016-02-01 23:33:54 -0700 |
---|---|---|
committer | katherine <shmibs@shmibbles.me> | 2016-02-01 23:33:54 -0700 |
commit | 97becb02d2aa821d14077c3f0064000318a4ae71 (patch) | |
tree | e8a6bffb67444a7a9fbc463d3ef96324f08378f7 /.config/herbstluftwm | |
parent | d6d77e40098945376c5daa0dc3fbf6760ef28bb0 (diff) | |
download | dotfiles-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.sh | 8 |
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) } |