aboutsummaryrefslogtreecommitdiffstats
path: root/completions
diff options
context:
space:
mode:
authorLibravatar Réouven Assouly <reouvenassouly@yahoo.fr>2019-01-01 16:16:11 +0100
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-01-02 21:38:32 -0500
commitcf00fb2ccc2063fbbd5b72e0d3b8e75697243c3b (patch)
tree396cf56d64b974593ec69110a9418e4b9ff02405 /completions
parentImplement tiling_drag_threshold (diff)
downloadsway-cf00fb2ccc2063fbbd5b72e0d3b8e75697243c3b.tar.gz
sway-cf00fb2ccc2063fbbd5b72e0d3b8e75697243c3b.tar.zst
sway-cf00fb2ccc2063fbbd5b72e0d3b8e75697243c3b.zip
zsh: update completions
Diffstat (limited to 'completions')
-rw-r--r--completions/zsh/_sway4
-rw-r--r--completions/zsh/_swaybar13
-rw-r--r--completions/zsh/_swayidle22
-rw-r--r--completions/zsh/_swaylock40
-rw-r--r--completions/zsh/_swaymsg12
5 files changed, 77 insertions, 14 deletions
diff --git a/completions/zsh/_sway b/completions/zsh/_sway
index 05112002..a7f55cc5 100644
--- a/completions/zsh/_sway
+++ b/completions/zsh/_sway
@@ -13,8 +13,8 @@
13# 13#
14# ------------------------------- 14# -------------------------------
15_arguments -s \ 15_arguments -s \
16 '(-v --version)'{-v,--version}'[shows version]' \ 16 '(-v --version)'{-v,--version}'[Show the version number and quit]' \
17 '(-h --help)'{-h,--help}'[shows help message]' \ 17 '(-h --help)'{-h,--help}'[Show help message and quit]' \
18 '(-c --config)'{-c,--config}'[Specify a config file]:files:_files' \ 18 '(-c --config)'{-c,--config}'[Specify a config file]:files:_files' \
19 '(-C --validate)'{-C,--validate}'[Check validity of the config file, then exit]' \ 19 '(-C --validate)'{-C,--validate}'[Check validity of the config file, then exit]' \
20 '(-d --debug)'{-d,--debug}'[Enables full logging, including debug information]' \ 20 '(-d --debug)'{-d,--debug}'[Enables full logging, including debug information]' \
diff --git a/completions/zsh/_swaybar b/completions/zsh/_swaybar
new file mode 100644
index 00000000..4fdfdd8a
--- /dev/null
+++ b/completions/zsh/_swaybar
@@ -0,0 +1,13 @@
1#compdef swaybar
2#
3# Completion script for swaybar
4#
5
6local bars=($(swaymsg -t get_bar_config | sed -e '/^\[/,/\]$/{//d;s/^ *"\(.*\)",\?.*$/\1/}'))
7
8_arguments -s \
9 '(-h --help)'{-h,--help}'[Show help message and quit]' \
10 '(-v --version)'{-v,--version}'[Show version and quit]' \
11 '(-s --socket)'{-s,--socket}'[Connect to sway via socket]:filename:_files' \
12 '(-b --bar_id)'{-b,--bar-id}'[Bar ID for which to get the configuration]:filename:($bars)'\
13 '(-d --debug)'{-d,--debug}'[Enable debugging]'
diff --git a/completions/zsh/_swayidle b/completions/zsh/_swayidle
new file mode 100644
index 00000000..b419bc2c
--- /dev/null
+++ b/completions/zsh/_swayidle
@@ -0,0 +1,22 @@
1#compdef swayidle
2#
3# Completion script for swayidle
4#
5
6local events=('timeout:Execute timeout command if there is no activity for timeout seconds'
7 'before-sleep:Execute before-sleep command before sleep')
8local resume=('resume:Execute command when there is activity again')
9
10if (($#words <= 2)); then
11 _arguments -C \
12 '(-h --help)'{-h,--help}'[Show help message and quit]' \
13 '(-d)'-d'[Enable debug output]'
14 _describe -t "events" 'swayidle' events
15
16elif [[ "$words[-3]" == before-sleep || "$words[-3]" == resume ]]; then
17 _describe -t "events" 'swayidle' events
18
19elif [[ "$words[-4]" == timeout ]]; then
20 _describe -t "events" 'swayidle' events
21 _describe -t "resume" 'swayidle' resume
22fi
diff --git a/completions/zsh/_swaylock b/completions/zsh/_swaylock
index 8fb4834c..9bc84ec9 100644
--- a/completions/zsh/_swaylock
+++ b/completions/zsh/_swaylock
@@ -4,11 +4,37 @@
4# 4#
5 5
6_arguments -s \ 6_arguments -s \
7 '(-v --version)'{-v,--version}'[Show the version number and quit]' \ 7 '(-C --config)'{-C,--config}'[Path to the config file]:filename:_files' \
8 '(-h --help)'{-h,--help}'[Show help message and quit]' \ 8 '(-c --color)'{-c,--color}'[Turn the screen into the given color instead of white]:color:' \
9 '(-f --daemonize)'{-f,--daemonize}'[Detach from the controlling terminal]' \ 9 '(-e --ignore-empty-password)'{-e,--ignore-empty-password}'[When an empty password is provided, do not validate it]' \
10 '(-c --color)'{-c,--color}'[Specify a color (rrggbb)]' \ 10 '(-f --daemonize)'{-f,--daemonize}'[Detach from the controlling terminal after locking]' \
11 '(-i --image)'{-i,--image}'[Display an image]:files:_files' \ 11 '(-h --help)'{-h,--help}'[Show help message and quit]' \
12 '(-s --scaling)'{-s,--scaling}'[Scaling mode]:mode:(stretch fill fit center tile)' \ 12 '(-i --image)'{-i,--image}'[Display an image]:filename:_files' \
13 '(-s --scaling)'{-s,--scaling}'[Scaling mode]:mode:(stretch fill fit center tile)' \
14 '(-t --tiling)'{-t,--tiling}'[Same as --scaling=tile]' \
13 '(-u --no-unlock-indicator)'{-u,--no-unlock-indicator}'[Disable the unlock indicator]' \ 15 '(-u --no-unlock-indicator)'{-u,--no-unlock-indicator}'[Disable the unlock indicator]' \
14 '(--socket)'--socket'[Use the specified socket path.]:files:_files' \ 16 '(-v --version)'{-v,--version}'[Show the version number and quit]' \
17 '(--bs-hl-color)'--bs-hl-color'[Sets the color of backspace highlights segments]:color:' \
18 '(--font)'--font'[Sets the font of the text]:font:' \
19 '(--indicator-radius)'--indicator-radius'[Sets the indicator radius]:radius:' \
20 '(--indicator-thickness)'--indicator-thickness'[Sets the indicator thickness]:thickness:' \
21 '(--inside-color)'--inside-color'[Sets the color of the inside of the indicator]:color:' \
22 '(--inside-clear-color)'--inside-clear-color'[Sets the color of the inside of the indicator when cleared]:color:' \
23 '(--inside-clear-color)'--inside-clear-color'[Sets the color of the inside of the indicator when verifying]:color:' \
24 '(--inside-wrong-color)'--inside-wrong-color'[Sets the color of the inside of the indicator when invalid]:color:' \
25 '(--key-hl-color)'--key-hl-color'[Sets the color of the key press highlight segments]:color:' \
26 '(--line-color)'--line-color'[Sets the color of the line between the inside and ring]:color:' \
27 '(--line-clear-color)'--line-clear-color'[Sets the color of the line between the inside and ring when cleared]:color:' \
28 '(--line-ver-color)'--line-ver-color'[Sets the color of the line between the inside and ring when verifying]:color:' \
29 '(--line-wrong-color)'--line-wrong-color'[Sets the color of the line between the inside and ring when invalid]:color:' \
30 '(-n --line-uses-inside)'{-n,--line-uses-inside}'[Use the inside color for the line between the inside and ring]' \
31 '(-r --line-uses-ring)'{-r,--line--uses-ring}'[Use the ring color for the line between the inside and ring]' \
32 '(--ring-color)'--ring-color'[Sets the color of the ring of the indicator]:color:' \
33 '(--ring-clear-color)'--ring-clear-color'[Sets the color of the ring of the indicator when cleared]:color:' \
34 '(--ring-ver-color)'--ring-ver-color'[Sets the color of the ring of the indicator when verifying]:color:' \
35 '(--ring-wrong-color)'--ring-wrong-color'[Sets the color of the ring of the indicator when invalid]:color:' \
36 '(--separator-color)'--separator-color'[Sets the color of the lines that separate highlight segments]:color:' \
37 '(--text-color)'--text-color'[Sets the color of the text]:color:' \
38 '(--text-clear-color)'--text-clear-color'[Sets the color of the text when cleared]:color:' \
39 '(--text-ver-color)'--text-ver-color'[Sets the color of the text when verifying]:color:' \
40 '(--text-wrong-color)'--text-wrong-color'[Sets the color of the text when invalid]:color:' \ No newline at end of file
diff --git a/completions/zsh/_swaymsg b/completions/zsh/_swaymsg
index a7a1c8e0..0ba45d4a 100644
--- a/completions/zsh/_swaymsg
+++ b/completions/zsh/_swaymsg
@@ -28,8 +28,10 @@ types=(
28) 28)
29 29
30_arguments -s \ 30_arguments -s \
31 '(-v --version)'{-v,--version}'[Print the version (of swaymsg) and quit]' \ 31 '(-v --version)'{-v,--version}'[Show the version number and quit]' \
32 '(-h --help)'{-h,--help}'[Shows help message]' \ 32 '(-m --monitor)'{-m,--monitor}'[Monitor until killed (-t SUBSCRIBE only)]' \
33 '(-q --quiet)'{-q,--quiet}'[Sends the IPC message but does not print the response from sway]' \ 33 '(-h --help)'{-h,--help}'[Show help message and quit]' \
34 '(-s --socket)'{-s,--socket}'[Use the specified socket path.]:files:_files' \ 34 '(-q --quiet)'{-q,--quiet}'[Be quiet]' \
35 '(-t --type)'{-t,--type}'[Specify the type of IPC message.]:type:{_describe "type" types}' 35 '(-r --raw)'{-r,--raw}'[Use raw output even if using a tty]' \
36 '(-s --socket)'{-s,--socket}'[Use the specified socket path]:files:_files' \
37 '(-t --type)'{-t,--type}'[Specify the message type]:type:{_describe "type" types}'