diff options
Diffstat (limited to '.local/bin/playerctl_systray')
| -rwxr-xr-x | .local/bin/playerctl_systray | 19 |
1 files changed, 19 insertions, 0 deletions
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 |
