fix(waybar): Custom scripts
This commit is contained in:
		
							parent
							
								
									6005ee646c
								
							
						
					
					
						commit
						411590d12c
					
				
					 3 changed files with 20 additions and 9 deletions
				
			
		|  | @ -19,15 +19,24 @@ while getopts ":g" option; do | |||
|             if [ "${current_state}" == "${STOPPED_MSG}" ]; then | ||||
|                 state='disconnected' | ||||
|                 tooltip='Connect tailnet' | ||||
| 
 | ||||
|                 printf '{"alt": "%s", "tooltip": "%s", "class": "%s" }' \ | ||||
|                     "${state}" "${tooltip}" "${state}" | ||||
|             else | ||||
|                 state='connected' | ||||
|                 tooltip="${status:='Disconnect tailnet'}" | ||||
| 
 | ||||
|                 printf '{"alt": "%s", "tooltip": "<tt>%q</tt>", "class": "%s" }' \ | ||||
|                     "${state}" "${tooltip}" "${state}" | ||||
|             fi | ||||
| 
 | ||||
|             printf '{"alt": "%s", "tooltip": "%q", "class": "%s" }' \ | ||||
|                 "${state}" "${tooltip}" "${state}" | ||||
|             exit 0 | ||||
|             ;; | ||||
| 
 | ||||
|         *) | ||||
|             echo 'Invalid option' | ||||
|             exit 1 | ||||
|             ;; | ||||
|     esac | ||||
| done | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue