]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - herbstluftwm/autostart
herbstluftwm/autostart: fix notify() with dzen2
[config/dotfiles.git] / herbstluftwm / autostart
index cf2247d5094897eeb2eadeb513a1a4b6b94b2a5d..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
@@ -72,7 +74,7 @@ for locker in xscreensaver xtrlock ''; do
     fi
 done
 if test -z "$locker"; then
-    echo 'No screen locker found!' | notify 60 &
+    echo 'No screen locker found!' | notify 60
 fi
 # Additional options.
 locker_pre=