summaryrefslogtreecommitdiffstats
path: root/clerk
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2016-04-20 03:43:54 +0200
committerRasmus Steinke <rasi@xssn.at>2016-04-20 03:43:54 +0200
commit7cfa464d06a6745e48aae8d59e6fa49f660afcdc (patch)
tree0c6e9088d144c189a76125ecfc0df9dae6e90729 /clerk
parent6bd8785bde75df856ab6efde2041617571a59282 (diff)
downloadperl-app-clerk-7cfa464d06a6745e48aae8d59e6fa49f660afcdc.tar.gz
perl-app-clerk-7cfa464d06a6745e48aae8d59e6fa49f660afcdc.tar.xz
dont show window when suspending/resuming from cli
Diffstat (limited to 'clerk')
-rwxr-xr-xclerk16
1 files changed, 12 insertions, 4 deletions
diff --git a/clerk b/clerk
index f921e9e..184beb6 100755
--- a/clerk
+++ b/clerk
@@ -714,8 +714,12 @@ suspendPlaylist () {
else
echo " "
fi
- notify-send "Clerk" "Playlist suspended"
+ notify-send "Clerk" "Playlist suspended"
+ if [[ $cli == "true" ]]; then
+ exit
+ else
dplayQueue
+ fi
fi
}
@@ -732,7 +736,11 @@ resumePlaylist () {
mpc seek "$time"
mpc toggle
notify-send "Clerk" "Resumed last-suspended Playlist"
- dplayQueue
+ if [[ $cli == "true" ]]; then
+ exit
+ else
+ dplayQueue
+ fi
}
# Play or delete items from current Queue
@@ -2064,9 +2072,9 @@ while :; do
elif [[ $2 == delete ]]; then
dplayQueueDelete
elif [[ $2 == suspend ]]; then
- suspendPlaylist
+ cli=true suspendPlaylist
elif [[ $2 == resume ]]; then
- resumePlaylist
+ cli=true resumePlaylist
fi
break
;;