You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							66 lines
						
					
					
						
							952 B
						
					
					
				
			
		
		
	
	
							66 lines
						
					
					
						
							952 B
						
					
					
				| # swaymsg(1) completion
 | |
| 
 | |
| _swaymsg()
 | |
| {
 | |
|   local cur prev types short long
 | |
|   _get_comp_words_by_ref cur prev
 | |
| 
 | |
|   types=(
 | |
|     'get_workspaces'
 | |
|     'get_seats'
 | |
|     'get_inputs'
 | |
|     'get_outputs'
 | |
|     'get_tree'
 | |
|     'get_marks'
 | |
|     'get_bar_config'
 | |
|     'get_version'
 | |
|     'get_binding_modes'
 | |
|     'get_binding_state'
 | |
|     'get_config'
 | |
|     'send_tick'
 | |
|     'subscribe'
 | |
|   )
 | |
| 
 | |
|   short=(
 | |
|     -h
 | |
|     -m
 | |
|     -p
 | |
|     -q
 | |
|     -r
 | |
|     -s
 | |
|     -t
 | |
|     -v
 | |
|   )
 | |
| 
 | |
|   long=(
 | |
|     --help
 | |
|     --monitor
 | |
|     --pretty
 | |
|     --quiet
 | |
|     --raw
 | |
|     --socket
 | |
|     --type
 | |
|     --version
 | |
|   )
 | |
| 
 | |
|   case $prev in
 | |
|     -s|--socket)
 | |
|       _filedir
 | |
|       return
 | |
|       ;;
 | |
|     -t|--type)
 | |
|       COMPREPLY=($(compgen -W "${types[*]}" -- "$cur"))
 | |
|       return
 | |
|       ;;
 | |
|   esac
 | |
| 
 | |
|   if [[ $cur == --* ]]; then
 | |
|     COMPREPLY=($(compgen -W "${long[*]}" -- "$cur"))
 | |
|   else
 | |
|     COMPREPLY=($(compgen -W "${short[*]}" -- "$cur"))
 | |
|     COMPREPLY+=($(compgen -W "${long[*]}" -- "$cur"))
 | |
|   fi
 | |
| 
 | |
| } &&
 | |
| complete -F _swaymsg swaymsg
 |