From dec3fb3dedac4db029b8f5d99077b79ae159cb88 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sun, 27 Oct 2024 23:11:36 +0800 Subject: add: play-pause.sh --- play-pause.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 play-pause.sh (limited to 'play-pause.sh') diff --git a/play-pause.sh b/play-pause.sh new file mode 100755 index 0000000..54ca7ea --- /dev/null +++ b/play-pause.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if hyprctl activewindow | grep 'class: zen-alpha' > /dev/null; then + playerctl -p spotify play-pause +elif [[ "$(playerctl status firefox)" == "Playing" ]]; then + playerctl --all-players pause +else + playerctl -p spotify play-pause +fi + -- cgit v1.2.3