Init
This commit is contained in:
		
						commit
						13abafae9d
					
				
					 12 changed files with 1095 additions and 0 deletions
				
			
		
							
								
								
									
										39
									
								
								ts-control
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										39
									
								
								ts-control
									
										
									
									
									
										Executable file
									
								
							|  | @ -0,0 +1,39 @@ | |||
| #!/usr/bin/env sh | ||||
| 
 | ||||
| action=$(printf "move\nfetch\naway\nback" | $DMENU) | ||||
| 
 | ||||
| ts_control_move_self() { | ||||
|   channel=$(teamspeak-query-lib channels | $DMENU) | ||||
|   if [ -z "$channel" ]; then | ||||
|     return 1 | ||||
|   fi | ||||
|   teamspeak-query-lib move --strict-channel "$channel" | ||||
|   return 0 | ||||
| } | ||||
| 
 | ||||
| case $action in | ||||
| 	"move") | ||||
| 	  ts_control_move_self | ||||
| 		;; | ||||
|   "fetch") | ||||
|       client=$(teamspeak-query-lib clients | $DMENU) | ||||
|       if [ -z "$client" ]; then | ||||
|         exit 1 | ||||
|       fi | ||||
|       teamspeak-query-lib fetch --strict-client "$client" | ||||
|     ;; | ||||
| 	"away") | ||||
| 	  message=$(printf "\n" | $DMENU -p "message") | ||||
| 	  if [ -z "$message" ]; then | ||||
| 	    exit 1 | ||||
|     fi | ||||
| 		teamspeak-query-lib move "Away From Keyboard" | ||||
| 		teamspeak-query-lib update --away "$message" | ||||
| 		teamspeak-query-lib update --microphone=false --speakers=false --away "$message" | ||||
| 		;; | ||||
| 	"back") | ||||
| 		teamspeak-query-lib update --back | ||||
| 	  ts_control_move_self | ||||
| 		teamspeak-query-lib update --microphone=true --speakers=true | ||||
| 		;; | ||||
| esac | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue