👽
This commit is contained in:
1 parent
0b17aa140b
commit
dde4ef218a
136 files changed
+9796
No files matched your search
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
[ ! -d $cache_dir ] && mkdir $cache_dir
|
||||
|
||||
cache_dir="$HOME/.cache/eww"
|
||||
cache="$cache_dir/control-center.eww"
|
||||
config="$HOME/.config/polybar/widgets/control"
|
||||
active_players=$(playerctl -l | head -n 1)
|
||||
|
||||
run () {
|
||||
eww -c $config open control-panel
|
||||
eww -c $config update control-panel=true
|
||||
[[ ! -z $active_players ]] && eww -c $config update music-panel=true
|
||||
}
|
||||
|
||||
if [[ ! `pidof eww` ]]; then
|
||||
eww -c $config daemon
|
||||
|
||||
else
|
||||
if [ ! -f $cache ]; then
|
||||
touch $cache
|
||||
run
|
||||
else
|
||||
[[ ! -z $active_players ]] && eww -c $config update music-panel=false
|
||||
eww -c $config update control-panel=false
|
||||
eww -c $config close control-panel
|
||||
rm $cache
|
||||
fi
|
||||
fi
|
||||
Reference in new issue
Block a user