mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-24 02:42:52 +00:00
kmix: make kmixremote sh compatible
This commit is contained in:
parent
c135cfa6bf
commit
fda742aba5
1 changed files with 6 additions and 6 deletions
|
@ -7,7 +7,7 @@
|
|||
# Mute
|
||||
#################################################################################
|
||||
|
||||
function usage
|
||||
usage
|
||||
{
|
||||
echo "Usage:"
|
||||
echo "List mixers # $0 list"
|
||||
|
@ -18,7 +18,7 @@ function usage
|
|||
echo
|
||||
}
|
||||
|
||||
function exit_with_error
|
||||
exit_with_error
|
||||
{
|
||||
echo "Error: $1"
|
||||
echo
|
||||
|
@ -27,7 +27,7 @@ function exit_with_error
|
|||
}
|
||||
|
||||
# Prints the mixer DBUS ID's on the console. leaving out the "/Mixers/" prefix
|
||||
function listMixers
|
||||
listMixers
|
||||
{
|
||||
qdbus org.kde.kmix /Mixers org.freedesktop.DBus.Properties.Get org.kde.KMix.MixSet mixers | cut -f3 -d/
|
||||
errorCode=$?
|
||||
|
@ -37,7 +37,7 @@ function listMixers
|
|||
}
|
||||
|
||||
# Prints the mixer control DBUS ID's of the given mixer on the console. leaving out the "/Mixers/" prefix
|
||||
function listControls
|
||||
listControls
|
||||
{
|
||||
qdbus org.kde.kmix $1 org.freedesktop.DBus.Properties.Get org.kde.KMix.Mixer controls | cut -f4 -d/
|
||||
errorCode=$?
|
||||
|
@ -59,8 +59,8 @@ while true; do
|
|||
if test -z "$arg"; then
|
||||
break
|
||||
elif test "x--master" = "x$arg"; then
|
||||
mixer=`qdbus org.kde.kmix /Mixers org.kde.KMix.MixSet.currentMasterMixer`
|
||||
control=`qdbus org.kde.kmix /Mixers org.kde.KMix.MixSet.currentMasterControl`
|
||||
mixer="$(qdbus org.kde.kmix /Mixers org.kde.KMix.MixSet.currentMasterMixer)"
|
||||
control="$(qdbus org.kde.kmix /Mixers org.kde.KMix.MixSet.currentMasterControl)"
|
||||
elif test "x--help" = "x$arg" -o "x-h" = "x$arg"; then
|
||||
usage
|
||||
exit 0
|
||||
|
|
Loading…
Add table
Reference in a new issue