dotfiles/hypridle/.config/hypr/suspend-script.sh

7 lines
186 B
Bash
Executable file

#!/usr/bin/env bash
# check if any player has status "Playing"
playerctl -a status | pkgs.ripgrep Playing -q
# only suspend if nothing is playing
if [ $? == 1 ]; then
bash -c $1
fi