wms/wms_dz.sh

49 lines
750 B
Bash
Raw Normal View History

2023-12-29 05:18:37 +01:00
#!/bin/sh
. /tmp/wms_var
## some info width dzen2 ##
FLAG=$1
clock() {
while true; do
date +%H:%M
sleep 60
done
}
# kill dzen
DZPID=$(pgrep dzen)
if [ -n "$DZPID" ]; then # if pid exist
pkill dzen # kill'em all
pkill dz.sh
else
case $FLAG in
-c)
clock | dzen2 -fn Hack-80 \
-fg "#$BC" -bg "#$AC" \
-w 360 -h 120 -x 500 -y 300 \
&
;;
-f)
sfetch.sh | dzen2 -fn Hack-14 \
-e 'onstart=uncollapse' -l 16 \
-fg "#$BC" -bg "#$AC" \
-w 960 -x 200 -y 160 -p \
&
;;
-s)
status.sh | dzen2 -fn Hack-14 \
-e 'onstart=uncollapse' -l 7 \
-fg "#$BC" -bg "#$AC" \
-w 500 -x 420 -y 280 -p \
&
;;
*)
exit 0
;;
esac
fi