Finalized cava module integration

This commit is contained in:
Simon
2021-01-16 15:07:23 +01:00
parent c5cd41b3fd
commit 7e2f21b27d
6 changed files with 454 additions and 329 deletions
+32 -14
View File
@@ -1,31 +1,49 @@
#!/bin/bash
# Kill hideit instances
######################
# Kill programs used by modules
#
# hideit
ps -ef | grep hideIt | grep -v grep | awk '{print $2}' | xargs kill
#
# cava
killall -q cava
######################
# Kill polybar instances
#
killall -q polybar
#
# Wait until the processes have been shut down
while pgrep -x polybar >/dev/null; do sleep 1; done
# Launch
polybar floating -r -l warning &
#setsid ~/.config/polybar/scripts/hideIt.sh --wait --region 0x1080+1920+-10 --name '^Polybar tray window$' &
######################
# Launch polybar(s)
#
polybar floating -r -l warning &
polybar floating_wm -r -l warning &
polybar floating_sysinfo -r -l warning &
polybar pc_vnc_landscape -r -l warning &
#
#polybar pc_vnc_landscape -r -l warning &
#
# Wait a moment for the bar(s) to set up
sleep 1
setsid ~/.config/polybar/scripts/hideIt.sh --wait --region 0x1080+1920+-10 --name '^polybar-floating_DP-4$' &
# Toggle sysinfo polybar
(xdo id -m -N Polybar && polybar-msg -p $(ps -ef | grep floating_sysinfo | grep -v grep | awk '{print $2}') cmd hide)&
######################
# Launch programs used by modules
#
setsid ~/.config/polybar/scripts/hideIt.sh --wait --region 0x1080+1920+-10 --name '^polybar-floating_DP-4$' > /dev/null 2>&1 &
#
# Hide floating_sysinfo polybar and reset popup state
(xdo id -m -N Polybar && polybar-msg -p $(ps -ef | grep floating_sysinfo | grep -v grep | awk '{print $2}') cmd hide) > /dev/null 2>&1 &
STATUSFILE="$HOME/.config/polybar/scripts/.sysinfo.active"
rm "$STATUSFILE"
rm -f "$STATUSFILE"
echo "Bar launched..."
######################
# Done!
#
echo "Bar launched!"