mirror of
https://github.com/hydroxycarbamide/dotfiles.git
synced 2025-05-08 05:49:06 -04:00
Add waybar
This commit is contained in:
parent
e0c17f71e2
commit
1ff2d77058
19 changed files with 1043 additions and 0 deletions
|
@ -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"
|
Loading…
Add table
Add a link
Reference in a new issue