summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2017-07-28 05:33:55 +0200
committerRasmus Steinke <rasi@xssn.at>2017-07-28 05:33:55 +0200
commit45b5eb2a38d9d0d9c335f8c45888d0bf84ec65dd (patch)
treefa73f70aab15c102a67f1ccee5fbeb42feceb676
parentd00df7ff0d87f728c4c95dd0421fba0ee9e54d54 (diff)
downloadclerk-legacy.tar.gz
clerk-legacy.tar.bz2
convert more ifslegacy
-rwxr-xr-xclerk_fzf/clerk_fzf66
1 files changed, 38 insertions, 28 deletions
diff --git a/clerk_fzf/clerk_fzf b/clerk_fzf/clerk_fzf
index 60f295d..81f53c7 100755
--- a/clerk_fzf/clerk_fzf
+++ b/clerk_fzf/clerk_fzf
@@ -275,39 +275,49 @@ playlists () {
}
playlistactions () {
- menu_content=(
- "Load Playlist"
- "Append Playlist"
- "Delete Playlist"
- "Cancel")
+ menu_content=("Load Playlist"
+ "Append Playlist"
+ "Delete Playlist"
+ "Cancel")
plmenu="$(printf '%s\n' "${menu_content[@]}" | fzf -m -e --reverse -i --ansi)"
- if [[ $val -eq 130 ]]; then
+
+ if [[ $val -eq 130 ]]
+ then
tmux findw -t playlists
fi
- if [[ $plmenu == "Load Playlist" ]]; then
- mpc clear > /dev/null; mpc load "${plsmenu}" > /dev/null; mpc play > /dev/null
- tmux findw -t music queue
- $(${script})
- elif [[ $plmenu == "Add Playlist" ]]; then
- mpc load "${plsmenu}" > /dev/null
- tmux findw -t music queue
- $(${script})
- elif [[ $plmenu == "Delete Playlist" ]]; then
- del_content=(
- "Yes"
- "No")
-
- delmenu="$(printf '%s\n' "${del_content[@]}" | fzf --reverse -i --ansi --header="Delete Playlist ${plsmenu}?")"
- if [[ $delmenu == "Yes" ]]; then
- mpc rm "${plsmenu}"
- playlists
- elif [[ $delmenu == "No" ]]; then
+
+ case $plmenu in
+ "Load Playlist")
+ mpc clear > /dev/null; mpc load "${plsmenu}" > /dev/null; mpc play > /dev/null
+ tmux findw -t music queue
+ $(${script})
+ ;;
+ "Add Playlist")
+ mpc load "${plsmenu}" > /dev/null
+ tmux findw -t music queue
+ $(${script})
+ ;;
+ "Delete Playlist")
+ del_content=("Yes"
+ "No")
+
+ delmenu="$(printf '%s\n' "${del_content[@]}" | fzf --reverse -i --ansi --header="Delete Playlist ${plsmenu}?")"
+
+ case $delmenu in
+ "Yes")
+ mpc rm "${plsmenu}"
+ playlists
+ ;;
+ "No")
+ playlists
+ ;;
+ esac
+ ;;
+ "Cancel")
playlists
- fi
- elif [[ $plmenu == "Cancel" ]]; then
- playlists
- fi
+ ;;
+ esac
}
clerk_help () {