Add waybar

This commit is contained in:
Hydroxycarbamide 2024-05-14 19:47:03 +02:00
parent e0c17f71e2
commit 1ff2d77058
19 changed files with 1043 additions and 0 deletions

View file

@ -0,0 +1,18 @@
#!/bin/bash
# manually go through players
read -d'\n' -ra PLAYERS <<<"$(playerctl -l 2>/dev/null)"
declare -a PAUSED
for player in "${PLAYERS[@]}"; do
[ "$player" = "playerctld" ] && continue;
p_status=$(playerctl -p "$player" status 2>/dev/null)
# if we have one playing, we'll use it and EXIT
if [ "$p_status" = "Playing" ]; then
echo "Playing"
exit 0;
fi
done
echo "Paused"