diff options
| author | Blista Kanjo | 2024-06-26 07:47:53 -0400 |
|---|---|---|
| committer | Blista Kanjo | 2024-06-26 07:47:53 -0400 |
| commit | c80ee4f6a3b646b8fc53d32ceb9f2d595d1870f6 (patch) | |
| tree | f2575e768648682db25de1a398beaffcfdc50c34 /.local/bin | |
| parent | 8b39f73286dca8124def51e2d8152dca00a65fb1 (diff) | |
feat: add `playerctl_systray`
Diffstat (limited to '.local/bin')
| -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 |
