bash/for_smol/musicctrl.sh

15 lines
210 B
Bash
Raw Normal View History

2023-02-14 18:22:28 +00:00
#!/bin/bash
playerstatus=$(playerctl status)
echo "$playerstatus"
if [[ "$playerstatus" = "Playing" ]]
then
playerctl -a stop
exit 0
fi
if [[ "$playerstatus" = "Stopped" ]]
then
playerctl play
exit 0
fi