diff --git a/soco-cli-gui.sh b/soco-cli-gui.sh index 45cda66..6384105 100755 --- a/soco-cli-gui.sh +++ b/soco-cli-gui.sh @@ -19,6 +19,7 @@ bgd="\033[1;4;31m" red="\033[1;31m" bold="\033[1m" bold_under="\033[1;4m" +greenbold="\033[1;32m" reset="\033[0m" list="local" @@ -341,11 +342,11 @@ soco() { 15) level_15;; 16|+) vol_+;; 17|-) vol_-;; - 27|o|N) pause_dev;; - 28|p|P) prev_dev;; - 29|n|N) next_dev;; - 30|s|S) start_dev;; - 31|t|T) stop_dev;; + 27|o|N) pause;; + 28|p|P) prev;; + 29|n|N) next;; + 30|s|S) start;; + 31|t|T) stop;; 32) party_mode;; 33|g|G) groupstatus;; 34|u|U) ungroup_all;; @@ -463,35 +464,35 @@ level_15() { } # Start $device -start_dev() { +start() { playing="Start $device..." # <= Shazaaam echo -e "\n${bold} $playing ${reset}" sonos $loc $device start && sleep 2 } # Stop $device -stop_dev() { +stop() { playing="Stop $device..." echo -e "\n${bold} $playing ${reset}" sonos $loc $device stop && sleep 2 } # Pause $device -pause_dev() { +pause() { playing="Pause $device..." echo -e "\n${bold} $playing ${reset}" sonos $loc $device pause && sleep 2 } # Previous tracks -prev_dev() { +prev() { #playing="Start $device..." # <= Shazaaam echo -e "\n${bold} $playing ${reset}" sonos $loc $device previous && sleep 2 } # Next tracks -next_dev() { +next() { #playing="Stop $device..." # <= Shazaaam echo -e "\n${bold} $playing ${reset}" sonos $loc $device next && sleep 2 @@ -534,7 +535,7 @@ rename_spk() { #exec "$ScriptLoc" } -vol_+() { +vol+() { #playing="Volume +..." #echo -e "\n${bold} $playing ${reset}" volume=$(sonos $loc $device volume) @@ -543,7 +544,7 @@ vol_+() { echo -e "\nSet volume to ${bold}level $vol${reset}" && sleep 0.5 } -vol_-() { +vol-() { #playing="Volume -..." #echo -e "\n${bold} $playing ${reset}" volume=$(sonos $loc $device volume) @@ -1519,10 +1520,10 @@ cli_help(){ echo echo "Run soco-cli-gui.sh (eg. soco-cli-gui.sh deezer_flow)" echo - printf "${bold}| %-25s | %-126s ${reset}\n" "Function name" "Role" + printf "${greenbold}| %-25s | %-126s ${reset}\n" "Function name" "Role" printf "${bold}| %-25s | %-126s ${reset}\n" "-------------------------" "--------------------------------------------------------------------------" - echo -e "\n${bold}Favorites${reset}" + echo -e "\n${greenbold}Favorites${reset}" printf "| ${bold}%-25s${reset} | %-126s \n" "deezer_flow" "Play Deezer flow" printf "| ${bold}%-25s${reset} | %-126s \n" "franceinfo" "Play France Info radio" printf "| ${bold}%-25s${reset} | %-126s \n" "franceinter" "Play France Inter radio" @@ -1530,49 +1531,49 @@ cli_help(){ printf "| ${bold}%-25s${reset} | %-126s \n" "rires" "Play Rires et Chansons radio" printf "| ${bold}%-25s${reset} | %-126s \n" "rtl" "Play RTL radio" - echo -e "\n${bold}Volume${reset}" + echo -e "\n${greenbold}Volume${reset}" printf "| ${bold}%-25s${reset} | %-126s \n" "level_11" "Set volume level to 11" printf "| ${bold}%-25s${reset} | %-126s \n" "level_13" "Set volume level to 13" printf "| ${bold}%-25s${reset} | %-126s \n" "level_15" "Set volume level to 15" - printf "| ${bold}%-25s${reset} | %-126s \n" "vol_+" "Turn up the volume" - printf "| ${bold}%-25s${reset} | %-126s \n" "vol_-" "Lower the volume" + printf "| ${bold}%-25s${reset} | %-126s \n" "vol+" "Turn up the volume" + printf "| ${bold}%-25s${reset} | %-126s \n" "vol-" "Lower the volume" printf "| ${bold}%-25s${reset} | %-126s \n" "mute_off" "Sets the mute setting of the speaker to 'off'." printf "| ${bold}%-25s${reset} | %-126s \n" "mute_on" "Sets the mute setting of the speaker to 'on'." printf "| ${bold}%-25s${reset} | %-126s \n" "all_mute_off" "Sets the mute setting of all speaker (coordinators) to 'off'." printf "| ${bold}%-25s${reset} | %-126s \n" "all_mute_on" "Sets the mute setting of all speaker (coordinators) to 'on'." - echo -e "\n${bold}Sleep${reset}" + echo -e "\n${greenbold}Sleep${reset}" printf "| ${bold}%-25s${reset} | %-126s \n" "sleeep" "Sleep menu" printf "| ${bold}%-25s${reset} | %-126s \n" "sleeep_duration" "Device goes to sleep in ." printf "| ${bold}%-25s${reset} | %-126s \n" "sleeep_timer" "Device goes to sleep at