mirror of
https://github.com/swaywm/sway.git
synced 2024-11-21 23:41:27 +00:00
zsh: update completions
This commit is contained in:
parent
5bf4daf263
commit
cf00fb2ccc
|
@ -13,8 +13,8 @@
|
|||
#
|
||||
# -------------------------------
|
||||
_arguments -s \
|
||||
'(-v --version)'{-v,--version}'[shows version]' \
|
||||
'(-h --help)'{-h,--help}'[shows help message]' \
|
||||
'(-v --version)'{-v,--version}'[Show the version number and quit]' \
|
||||
'(-h --help)'{-h,--help}'[Show help message and quit]' \
|
||||
'(-c --config)'{-c,--config}'[Specify a config file]:files:_files' \
|
||||
'(-C --validate)'{-C,--validate}'[Check validity of the config file, then exit]' \
|
||||
'(-d --debug)'{-d,--debug}'[Enables full logging, including debug information]' \
|
||||
|
|
13
completions/zsh/_swaybar
Normal file
13
completions/zsh/_swaybar
Normal file
|
@ -0,0 +1,13 @@
|
|||
#compdef swaybar
|
||||
#
|
||||
# Completion script for swaybar
|
||||
#
|
||||
|
||||
local bars=($(swaymsg -t get_bar_config | sed -e '/^\[/,/\]$/{//d;s/^ *"\(.*\)",\?.*$/\1/}'))
|
||||
|
||||
_arguments -s \
|
||||
'(-h --help)'{-h,--help}'[Show help message and quit]' \
|
||||
'(-v --version)'{-v,--version}'[Show version and quit]' \
|
||||
'(-s --socket)'{-s,--socket}'[Connect to sway via socket]:filename:_files' \
|
||||
'(-b --bar_id)'{-b,--bar-id}'[Bar ID for which to get the configuration]:filename:($bars)'\
|
||||
'(-d --debug)'{-d,--debug}'[Enable debugging]'
|
22
completions/zsh/_swayidle
Normal file
22
completions/zsh/_swayidle
Normal file
|
@ -0,0 +1,22 @@
|
|||
#compdef swayidle
|
||||
#
|
||||
# Completion script for swayidle
|
||||
#
|
||||
|
||||
local events=('timeout:Execute timeout command if there is no activity for timeout seconds'
|
||||
'before-sleep:Execute before-sleep command before sleep')
|
||||
local resume=('resume:Execute command when there is activity again')
|
||||
|
||||
if (($#words <= 2)); then
|
||||
_arguments -C \
|
||||
'(-h --help)'{-h,--help}'[Show help message and quit]' \
|
||||
'(-d)'-d'[Enable debug output]'
|
||||
_describe -t "events" 'swayidle' events
|
||||
|
||||
elif [[ "$words[-3]" == before-sleep || "$words[-3]" == resume ]]; then
|
||||
_describe -t "events" 'swayidle' events
|
||||
|
||||
elif [[ "$words[-4]" == timeout ]]; then
|
||||
_describe -t "events" 'swayidle' events
|
||||
_describe -t "resume" 'swayidle' resume
|
||||
fi
|
|
@ -4,11 +4,37 @@
|
|||
#
|
||||
|
||||
_arguments -s \
|
||||
'(-v --version)'{-v,--version}'[Show the version number and quit]' \
|
||||
'(-C --config)'{-C,--config}'[Path to the config file]:filename:_files' \
|
||||
'(-c --color)'{-c,--color}'[Turn the screen into the given color instead of white]:color:' \
|
||||
'(-e --ignore-empty-password)'{-e,--ignore-empty-password}'[When an empty password is provided, do not validate it]' \
|
||||
'(-f --daemonize)'{-f,--daemonize}'[Detach from the controlling terminal after locking]' \
|
||||
'(-h --help)'{-h,--help}'[Show help message and quit]' \
|
||||
'(-f --daemonize)'{-f,--daemonize}'[Detach from the controlling terminal]' \
|
||||
'(-c --color)'{-c,--color}'[Specify a color (rrggbb)]' \
|
||||
'(-i --image)'{-i,--image}'[Display an image]:files:_files' \
|
||||
'(-i --image)'{-i,--image}'[Display an image]:filename:_files' \
|
||||
'(-s --scaling)'{-s,--scaling}'[Scaling mode]:mode:(stretch fill fit center tile)' \
|
||||
'(-t --tiling)'{-t,--tiling}'[Same as --scaling=tile]' \
|
||||
'(-u --no-unlock-indicator)'{-u,--no-unlock-indicator}'[Disable the unlock indicator]' \
|
||||
'(--socket)'--socket'[Use the specified socket path.]:files:_files' \
|
||||
'(-v --version)'{-v,--version}'[Show the version number and quit]' \
|
||||
'(--bs-hl-color)'--bs-hl-color'[Sets the color of backspace highlights segments]:color:' \
|
||||
'(--font)'--font'[Sets the font of the text]:font:' \
|
||||
'(--indicator-radius)'--indicator-radius'[Sets the indicator radius]:radius:' \
|
||||
'(--indicator-thickness)'--indicator-thickness'[Sets the indicator thickness]:thickness:' \
|
||||
'(--inside-color)'--inside-color'[Sets the color of the inside of the indicator]:color:' \
|
||||
'(--inside-clear-color)'--inside-clear-color'[Sets the color of the inside of the indicator when cleared]:color:' \
|
||||
'(--inside-clear-color)'--inside-clear-color'[Sets the color of the inside of the indicator when verifying]:color:' \
|
||||
'(--inside-wrong-color)'--inside-wrong-color'[Sets the color of the inside of the indicator when invalid]:color:' \
|
||||
'(--key-hl-color)'--key-hl-color'[Sets the color of the key press highlight segments]:color:' \
|
||||
'(--line-color)'--line-color'[Sets the color of the line between the inside and ring]:color:' \
|
||||
'(--line-clear-color)'--line-clear-color'[Sets the color of the line between the inside and ring when cleared]:color:' \
|
||||
'(--line-ver-color)'--line-ver-color'[Sets the color of the line between the inside and ring when verifying]:color:' \
|
||||
'(--line-wrong-color)'--line-wrong-color'[Sets the color of the line between the inside and ring when invalid]:color:' \
|
||||
'(-n --line-uses-inside)'{-n,--line-uses-inside}'[Use the inside color for the line between the inside and ring]' \
|
||||
'(-r --line-uses-ring)'{-r,--line--uses-ring}'[Use the ring color for the line between the inside and ring]' \
|
||||
'(--ring-color)'--ring-color'[Sets the color of the ring of the indicator]:color:' \
|
||||
'(--ring-clear-color)'--ring-clear-color'[Sets the color of the ring of the indicator when cleared]:color:' \
|
||||
'(--ring-ver-color)'--ring-ver-color'[Sets the color of the ring of the indicator when verifying]:color:' \
|
||||
'(--ring-wrong-color)'--ring-wrong-color'[Sets the color of the ring of the indicator when invalid]:color:' \
|
||||
'(--separator-color)'--separator-color'[Sets the color of the lines that separate highlight segments]:color:' \
|
||||
'(--text-color)'--text-color'[Sets the color of the text]:color:' \
|
||||
'(--text-clear-color)'--text-clear-color'[Sets the color of the text when cleared]:color:' \
|
||||
'(--text-ver-color)'--text-ver-color'[Sets the color of the text when verifying]:color:' \
|
||||
'(--text-wrong-color)'--text-wrong-color'[Sets the color of the text when invalid]:color:'
|
|
@ -28,8 +28,10 @@ types=(
|
|||
)
|
||||
|
||||
_arguments -s \
|
||||
'(-v --version)'{-v,--version}'[Print the version (of swaymsg) and quit]' \
|
||||
'(-h --help)'{-h,--help}'[Shows help message]' \
|
||||
'(-q --quiet)'{-q,--quiet}'[Sends the IPC message but does not print the response from sway]' \
|
||||
'(-s --socket)'{-s,--socket}'[Use the specified socket path.]:files:_files' \
|
||||
'(-t --type)'{-t,--type}'[Specify the type of IPC message.]:type:{_describe "type" types}'
|
||||
'(-v --version)'{-v,--version}'[Show the version number and quit]' \
|
||||
'(-m --monitor)'{-m,--monitor}'[Monitor until killed (-t SUBSCRIBE only)]' \
|
||||
'(-h --help)'{-h,--help}'[Show help message and quit]' \
|
||||
'(-q --quiet)'{-q,--quiet}'[Be quiet]' \
|
||||
'(-r --raw)'{-r,--raw}'[Use raw output even if using a tty]' \
|
||||
'(-s --socket)'{-s,--socket}'[Use the specified socket path]:files:_files' \
|
||||
'(-t --type)'{-t,--type}'[Specify the message type]:type:{_describe "type" types}'
|
||||
|
|
Loading…
Reference in a new issue