]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
herbstluftwm/autostart: fix notify() with dzen2
authorSimon Ruderich <simon@ruderich.org>
Sat, 14 Jun 2014 19:20:54 +0000 (21:20 +0200)
committerSimon Ruderich <simon@ruderich.org>
Sat, 14 Jun 2014 19:20:54 +0000 (21:20 +0200)
Without the read x, the message is not displayed when & is used.

herbstluftwm/autostart

index 0cbecf49220e396302e4c3ba279129d17117a672..f8b7c3a560d73841e34c6b2ec626d279624ea86b 100755 (executable)
@@ -30,7 +30,9 @@ installed() {
 # $1: timeout
 notify() {
     if installed dzen2; then
-        sed 's/\^/^^/g' | dzen2 -fg blue -bg yellow -y 15 -h 30 -p "$1" &
+        read x
+        printf '%s\n' "$x" | sed 's/\^/^^/g' \
+            | dzen2 -fg blue -bg yellow -y 15 -h 30 -p "$1" &
     elif installed xmessage; then
         # Fallback solution, display first line of stdin.
         read x