add notifyfo
This commit is contained in:
parent
9c336785ac
commit
458578b4ad
2 changed files with 31 additions and 0 deletions
12
notifyfo/README.md
Normal file
12
notifyfo/README.md
Normal 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
19
notifyfo/notifyfo.sh
Executable 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
|
Loading…
Reference in a new issue