1
0
Fork 0
forked from encrypt/random

add notifyfo

This commit is contained in:
encrypt 2016-03-14 17:35:39 +01:00
parent 9c336785ac
commit 458578b4ad
2 changed files with 31 additions and 0 deletions

12
notifyfo/README.md Normal file
View file

@ -0,0 +1,12 @@
notifyfo
========
Send simple notifications from shitty programs, without dbus and without system().
Usage
-----
```
$ ./notifyfo.sh
$ echo "Fuck you d-bus, fuck you." > /tmp/notify-send
```

19
notifyfo/notifyfo.sh Executable file
View file

@ -0,0 +1,19 @@
#!/bin/bash
# WTFPL
# fuck you dbus, fuck you.
fifo="/tmp/notify-send"
trap "rm -rf $fifo" EXIT
if [[ ! -p $fifo ]];
then
mkfifo $fifo
chmod 666 $fifo
fi
while read line < $fifo
do
notify-send "$line"
done