Files
dotfile/usr/local/bin/sidebar
T
2023-05-25 01:05:57 +05:45

28 lines
474 B
Bash
Executable File

#!/usr/bin/env bash
#By: S4NKALP https://github.com/S4NKALP
FILE="$HOME/.cache/eww.sidebar"
ewwcfg="$HOME/.config/bspwm/widgets/sidebar"
EWW=`which eww`
if [[ ! `pidof eww` ]]; then
${EWW} -c $HOME/.config/bspwm/widgets/sidebar daemon &
sleep 1
fi
launch_eww() {
${EWW} --config "$ewwcfg" open dashboard
}
## Launch or close widgets accordingly
if [[ ! -f "$FILE" ]]; then
touch "$FILE"
launch_eww
else
${EWW} --config "$ewwcfg" close dashboard
rm "$FILE"
fi