nix/home/hyprland/pause.sh

15 lines
261 B
Bash
Raw Normal View History

2024-06-20 14:12:04 +02:00
#!/bin/bash
# Get the current state of MOC
state=$(mocp -Q %state)
# Check the state and toggle accordingly
if [ "$state" == "PLAY" ]; then
mocp -P
elif [ "$state" == "PAUSE" ]; then
mocp -U
else
echo "MOC is not currently playing or paused."
fi