2 # amarok.sh -- amarok pausing script for vlock,
3 # the VT locking program for linux
5 # This program is copyright (C) 2007 Frank Benkstein, and is free software. It
6 # comes without any warranty, to the extent permitted by applicable law. You
7 # can redistribute it and/or modify it under the terms of the Do What The Fuck
8 # You Want To Public License, Version 2, as published by Sam Hocevar. See
9 # http://sam.zoy.org/wtfpl/COPYING for more details.
16 while read hook_name
; do
17 case "${hook_name}" in
19 amarok_status
=$
(dcop amarok player isPlaying
2>/dev
/null ||
echo false
)
20 if [ "${amarok_status}" = "true" ] ; then
21 dcop amarok player pause
25 if [ "${amarok_status}" = "true" ] ; then
26 dcop amarok player play
33 if [ $# -ne 1 ] ; then
34 echo >&2 "Usage: $0 <command>"
61 echo >&2 "$0: unknown command '$1'"