#!/bin/bash case "$1" in toggle) cmd="play-pause" ;; next) cmd="next" ;; previous) cmd="previous" ;; *) echo "wrong argument $1" exit 1 ;; esac playerctl "${cmd}" ~/.i3/scripts/bar-update spotify