dotfiles/.scripts/foobar2000.sh

26 lines
452 B
Bash
Raw Normal View History

2023-09-26 17:12:28 +02:00
#!/bin/sh
# Required: foo_runcmd
export WINEPREFIX="$HOME/.local/share/wineprefixes/foobar2000"
foobar2000_cmd="$HOME/.foobar2000/foobar2000.exe"
function foo_runcmd {
if pgrep foobar2000.exe &> /dev/null; then
wine "$foobar2000_cmd" "${@}" &> /dev/null
fi
2023-09-26 17:12:28 +02:00
}
case "$1" in
-vu|volume-up)
foo_runcmd '/runcmd=Playback/Volume/Up';;
-vd|volume-down)
foo_runcmd '/runcmd=Playback/Volume/Down';;
*)
echo "Invalid option."
exit 1;;
esac