tadd dbus-less notifications ^_^ - scripts - random scripts
HTML git clone git://parazyd.org/scripts.git
DIR Log
DIR Files
DIR Refs
---
DIR commit ec341a07b44bd9aac24270916e52ca817320a346
DIR parent ef9abc4c0fd15669f6b0e925163140cc849b60c3
HTML Author: parazyd <parazyd@dyne.org>
Date: Sun, 13 Nov 2016 16:14:01 +0100
add dbus-less notifications ^_^
Diffstat:
M apk | 2 +-
A beepop | 37 +++++++++++++++++++++++++++++++
T popup | 0
3 files changed, 38 insertions(+), 1 deletion(-)
---
DIR diff --git a/apk b/apk
t@@ -5,7 +5,7 @@
_url="http://pkgs.alpinel"
_url="${_url}inux.org" # |
_url="${_url}/packages?" #
- _page="$(links -dump \
+ _page="$(elinks -dump \
"${_url}name=${_query}&arch=${_arch}")"
pkgtable="$(echo "$_page"|sed 34q |
grep $_query | grep '^\[')"; # xxx|
DIR diff --git a/beepop b/beepop
t@@ -0,0 +1,37 @@
+#!/bin/sh
+
+default_geometry() {
+ x=$(wattr w `lsw -r`)
+ y=$(wattr h `lsw -r`)
+
+ width=1136
+ height=28
+
+ offy=44
+ offx=$(( x - $width - 210 ))
+
+ echo "${width}x${height}+${offx}+${offy}"
+}
+
+FIFO=/tmp/beepop.fifo
+GEOM=$(default_geometry)
+FONT=Terminus
+BG=#00aabbcc
+FG=#00ccbbaa
+SLEEP=3
+
+case $(basename $0) in
+ beepop)
+ test -p $FIFO || mkfifo $FIFO
+
+ tail -f $FIFO | while read LINE; do
+ (
+ echo "%{r}$LINE %{F${HL}}"
+ sleep $SLEEP
+ ) | lemonbar -d -g "$GEOM"
+ done
+ ;;
+ popup)
+ echo "%{c}%{F#333333}%{B#e84f4f} $* %{F-}%{B-}" > $FIFO
+ ;;
+esac
DIR diff --git a/popup b/popup