Update formatting.

This commit is contained in:
CronyAkatsuki 2023-11-04 22:03:43 +01:00
parent 41754e8ad1
commit e1c508c53b
16 changed files with 287 additions and 278 deletions

View file

@ -3,26 +3,26 @@
# 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
load_config () {
. $HOME/.config/dmenu/config
load_config() {
. $HOME/.config/dmenu/config
}
menu () {
choice=$(playerctl -l | $DMENU -p 'Manage:')
[ -z "$choice" ] && exit
playerctl -p $choice $1
menu() {
choice=$(playerctl -l | $DMENU -p 'Manage:')
[ -z "$choice" ] && exit
playerctl -p $choice $1
}
main () {
load_config
main() {
load_config
command="$@"
[ -z "$command" ] && exit
instances=$(playerctl -l | wc -l)
command="$@"
[ -z "$command" ] && exit
instances=$(playerctl -l | wc -l)
[ "$instances" = "0" ] && exit
[ "$instances" = "0" ] && exit
[ "$instances" -lt "2" ] && playerctl $command || menu $command
[ "$instances" -lt "2" ] && playerctl $command || menu $command
}
main $@