25 lines
452 B
Bash
Executable file
25 lines
452 B
Bash
Executable file
#!/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
|
|
}
|
|
|
|
|
|
|
|
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
|