Stephan Raabe 1b36fb7b1b Updates
2024-04-16 21:46:53 +02:00

33 lines
571 B
Bash
Executable File

#!/bin/bash
## Files and CMD
FILE="$HOME/.cache/eww_launch.sidebar"
CFG="$HOME/dotfiles/eww/ml4w-dashboard"
EWW=`which eww`
## Run eww daemon if not running already
if [[ ! `pidof eww` ]]; then
${EWW} daemon
sleep 1
fi
## Open widgets
run_eww() {
${EWW} --config "$CFG" open-many \
resources \
logout \
suspend \
lock \
reboot \
shutdown \
quotes
}
## Launch or close widgets accordingly
if [[ ! -f "$FILE" ]]; then
touch "$FILE"
run_eww
else
${EWW} --config "$CFG" close resources logout suspend lock reboot shutdown quotes
rm "$FILE"
fi