aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/playerctl_systray
blob: f96c28a02557578286c4204bd8910f2f50803bcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

BIN_PATH=~/.local/src/python-playerctl_systray/playerctl_systray
SCRIPT_PATH=~/.local/src/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