From 7cfa464d06a6745e48aae8d59e6fa49f660afcdc Mon Sep 17 00:00:00 2001 From: Rasmus Steinke Date: Wed, 20 Apr 2016 03:43:54 +0200 Subject: dont show window when suspending/resuming from cli --- clerk | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'clerk') 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 ;; -- cgit v1.2.3-24-g4f1b