@@ -6,11 +6,11 @@ current_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
66source  $current_dir /utils.sh
77
88function  trackStatus()  {
9-    local  active_player
9+ 	 local  active_player
1010  local  pause_icon=" $1 " 
1111  local  play_icon=" $2 " 
1212
13-    active_player=$( osascript -e " 
13+ 	 active_player=$( osascript -e " 
1414	property playerList : {\" Spotify\" , \" Music\" , \" Safari\" , \" Google Chrome\" } 
1515	property nativePlayerList : {\" Spotify\" , \" Music\" } 
1616
@@ -127,18 +127,20 @@ function trackStatus() {
127127	detectPlayer() 
128128	"  ) 
129129
130-   case  " $active_player " in 
131-   " not running" echo  " not running" 
132-   " stopped" echo  " stopped" 
133-   " can't encode" echo  " unable to encode" 
134-   " Not Supported" echo  " not supported" 
135130
136-   * ) echo  " $active_player " 
137-   esac 
131+ case  " $active_player " in 
132+ 		" not running" echo  " not running" 
133+ 		" stopped" echo  " stopped" 
134+     " can't encode" echo  " unable to encode" 
135+     " Not Supported" echo  " not supported" 
136+ 
137+ 		* ) echo  " $active_player " 
138+ 	esac 
138139
139140}
140141
141- function  sliceTrack()  {
142+ function  sliceTrack() 
143+ {
142144  local  str=" $1 " 
143145  local  std=" $2 " 
144146  local  len=${# str} 
@@ -155,6 +157,7 @@ function sliceTrack() {
155157  echo  " $result " 
156158}
157159
160+ 
158161function  remoteControl()  {
159162  toggle_button=" $1 " 
160163  back_button=" $2 " 
@@ -194,20 +197,20 @@ function scroll() {
194197  for  (( i =  0 ; i <=  len; i++ )) ;  do 
195198    scrolling_text=$( slice_text " $str " " $i " " $width " ) 
196199    echo  -ne " \r" 
197-     echo  " $scrolling_text " 
200+     echo  " $scrolling_text   " 
198201    echo  -ne " \r" 
199202
200203    sleep " $speed " 
201204  done 
202205
203206  echo  -ne " \r" 
204-   echo  " $scrolling_text " 
207+   echo  " $scrolling_text   " 
205208  echo  -ne " \r" 
206209}
207210
208211main () {
209212  #  save buffer to prevent lag
210-    local  cache_file=" /tmp/tmux_mac_player_cache" 
213+ 	 local  cache_file=" /tmp/tmux_mac_player_cache" 
211214
212215  RATE=$( get_tmux_option " @dracula-refresh-rate" ) 
213216
@@ -255,7 +258,7 @@ main() {
255258  else 
256259    echo  " $str " 
257260  fi 
258- 
259261}
260262
261263main
264+ 
0 commit comments