From c80ee4f6a3b646b8fc53d32ceb9f2d595d1870f6 Mon Sep 17 00:00:00 2001 From: Blista Kanjo Date: Wed, 26 Jun 2024 07:47:53 -0400 Subject: feat: add `playerctl_systray` --- .local/bin/playerctl_systray | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 .local/bin/playerctl_systray (limited to '.local/bin') diff --git a/.local/bin/playerctl_systray b/.local/bin/playerctl_systray new file mode 100755 index 0000000..5f4fcca --- /dev/null +++ b/.local/bin/playerctl_systray @@ -0,0 +1,19 @@ +#!/bin/sh + +BIN_PATH=~/.local/share/python-playerctl_systray/playerctl_systray +SCRIPT_PATH=~/.local/share/python-playerctl_systray/playerctl_systray.py + +if ! command -v playerctl >/dev/null 2>&1; then + echo "playerctl is not installed but is required." + notify-send "dependency missing:" "playerctl is required to run playerctl_systray." --urgency critical + exit 1 +fi + +if [ -f "$BIN_PATH" ]; then + $BIN_PATH +elif [ -f "$SCRIPT_PATH" ]; then + python3 $SCRIPT_PATH +else + echo "playerctl_systray(.py) not found" + notify-send "error!" "playerctl_systray(.py) not found" --urgency critical +fi -- cgit v1.2.3