Script to choose which player to control when multiple open.
This commit is contained in:
parent
309ea9f1c6
commit
a8516f7a54
16
dmenu-playerctl
Executable file
16
dmenu-playerctl
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
# script to run a menu prompt when having more than 2 players since
|
||||
# playerctl is bad at managing more than one player at the same time
|
||||
|
||||
command="$@"
|
||||
instances=$(playerctl -l | wc -l)
|
||||
|
||||
if [ "$instances" = "0" ]; then
|
||||
exit
|
||||
elif [ "$instances" -lt "2" ]; then
|
||||
playerctl $command
|
||||
else
|
||||
choice=$(playerctl -l | dmenu -p 'Manage:')
|
||||
playerctl -p $choice $command
|
||||
fi
|
Loading…
Reference in New Issue
Block a user