tNotification daemon. Creates a pipe to get notifications - scripts - various script and utils
(HTM) git clone git://z3bra.org/scripts
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) commit c41b8d074d9ea92ebb67f55f0d93485a7b28e7aa
(DIR) parent 53a88e98d9ff8a8b120f305c97bcceac0ae45593
(HTM) Author: z3bra <willy@mailoo.org>
Date: Tue, 6 May 2014 15:28:14 +0200
Notification daemon. Creates a pipe to get notifications
Diffstat:
A wrappop | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/wrappop b/wrappop
t@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# fifo that we'll use to feed the popups
+test -p /tmp/popup.fifo || mkfifo /tmp/popup.fifo
+
+w=150
+h=20
+x=1930
+y=10
+
+n=-1
+
+# get messages from the fifo
+tail -f /tmp/popup.fifo |
+while IFS= read -r message; do
+ # increment the counter
+ n=$((n + 1))
+
+ # display the popup under the others
+ {
+ ~/bin/popup -g ${w}x${h}+${x}+$((y + (h+y) * n)) $n ${message}
+ # decrement the counter
+ n=$((n - 1))
+ } &
+done