bash/for_smol/musicctrl.sh
cheesus_crust 9581bcc174 lets
2023-02-14 21:22:28 +03:00

15 lines
210 B
Bash

#!/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