wms/wms_panel.sh

49 lines
798 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)
2024-01-21 04:05:04 +01:00
if [ -n "$DZPID" ]; then
pkill dzen
2023-12-29 13:39:58 +01:00
pkill wms_dz.sh
2023-12-29 05:18:37 +01:00
else
case $FLAG in
2024-01-21 04:05:04 +01:00
-c) # make a simple clock.
2023-12-29 05:18:37 +01:00
clock | dzen2 -fn Hack-80 \
-fg "#$BC" -bg "#$AC" \
-w 360 -h 120 -x 500 -y 300 \
&
;;
2024-01-21 04:05:04 +01:00
-f) # make a simple fetch.
2023-12-29 05:18:37 +01:00
sfetch.sh | dzen2 -fn Hack-14 \
-e 'onstart=uncollapse' -l 16 \
-fg "#$BC" -bg "#$AC" \
-w 960 -x 200 -y 160 -p \
&
;;
2024-01-21 04:05:04 +01:00
-s) # make a simple status.
2023-12-29 05:18:37 +01:00
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