scripts

random scripts
git clone git://parazyd.org/scripts.git
Log | Files | Refs

commit ec341a07b44bd9aac24270916e52ca817320a346
parent ef9abc4c0fd15669f6b0e925163140cc849b60c3
Author: parazyd <parazyd@dyne.org>
Date:   Sun, 13 Nov 2016 16:14:01 +0100

add dbus-less notifications ^_^

Diffstat:
Mapk | 2+-
Abeepop | 37+++++++++++++++++++++++++++++++++++++
Tpopup | 0
3 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/apk b/apk @@ -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| diff --git a/beepop b/beepop @@ -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 diff --git a/popup b/popup