From 9f598859284ca72d08230301ddabda2fa537cb6d Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Thu, 26 Jul 2018 17:25:20 +0100 Subject: zsh: fix sway completion --- completions/zsh/_sway | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'completions') diff --git a/completions/zsh/_sway b/completions/zsh/_sway index bab90fbf..05112002 100644 --- a/completions/zsh/_sway +++ b/completions/zsh/_sway @@ -18,5 +18,5 @@ _arguments -s \ '(-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]' \ - '(-v --verbose)'{-v,--verbose}'[Enables more verbose logging]' \ + '(-V --verbose)'{-V,--verbose}'[Enables more verbose logging]' \ '(--get-socketpath)'--get-socketpath'[Gets the IPC socket path and prints it, then exits]' -- cgit v1.2.3 From 27e89cf61dab7b92edd905a50df3429d51c65e79 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Fri, 27 Jul 2018 16:31:04 +0100 Subject: bash: add completion for sway --- completions/bash/sway | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 completions/bash/sway (limited to 'completions') diff --git a/completions/bash/sway b/completions/bash/sway new file mode 100644 index 00000000..edd752cd --- /dev/null +++ b/completions/bash/sway @@ -0,0 +1,46 @@ +# sway(1) completion + +_sway() +{ + local cur prev + _get_comp_words_by_ref cur prev + + short=( + -h + -c + -C + -d + -v + -V + ) + + long=( + --help + --config + --validate + --debug + --version + --verbose + --get-socketpath + ) + + case $prev in + -c|--config) + _filedir + return + ;; + esac + + if [[ $cur == --* ]]; then + COMPREPLY=($(compgen -W "${long[*]}" -- "$cur")) + elif [[ $cur == -* ]]; then + COMPREPLY=($(compgen -W "${short[*]}" -- "$cur")) + COMPREPLY+=($(compgen -W "${long[*]}" -- "$cur")) + else + COMPREPLY=($(compgen -W "${short[*]}" -- "$cur")) + COMPREPLY+=($(compgen -W "${long[*]}" -- "$cur")) + COMPREPLY+=($(compgen -c -- "$cur")) + fi + +} && +complete -F _sway sway -- cgit v1.2.3 From 21609f8af26b51872ef045ec75cb543835961ead Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Fri, 27 Jul 2018 16:31:18 +0100 Subject: bash: add completion for swaymsg --- completions/bash/swaymsg | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 completions/bash/swaymsg (limited to 'completions') diff --git a/completions/bash/swaymsg b/completions/bash/swaymsg new file mode 100644 index 00000000..8ec90b6f --- /dev/null +++ b/completions/bash/swaymsg @@ -0,0 +1,57 @@ +# swaymsg(1) completion + +_swaymsg() +{ + local cur prev + _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_clipboard' + ) + + short=( + -h + -q + -r + -s + -t + -v + ) + + long=( + --help + --quiet + --raw + --socket + --type + --verbose + ) + + 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 -- cgit v1.2.3 From 4a8a19d21f91a3126d83ac42d6a96900f42ba64c Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Fri, 27 Jul 2018 16:31:30 +0100 Subject: bash: add completion for swaylock --- completions/bash/swaylock | 66 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 completions/bash/swaylock (limited to 'completions') diff --git a/completions/bash/swaylock b/completions/bash/swaylock new file mode 100644 index 00000000..33925480 --- /dev/null +++ b/completions/bash/swaylock @@ -0,0 +1,66 @@ +# swaylock(1) completion + +_swaylock() +{ + local cur prev + _get_comp_words_by_ref -n : cur prev + + short=( + -h + -c + -s + -t + -v + -i + -u + -f + ) + + long=( + --help + --color + --scaling + --tiling + --version + --image + --no-unlock-indicator + --daemonize + ) + + scaling=( + 'stretch' + 'fill' + 'fit' + 'center' + 'tile' + ) + + case $prev in + -c|--color) + return + ;; + --scaling) + COMPREPLY=($(compgen -W "${scaling[*]}" -- "$cur")) + return + ;; + -i|--image) + if grep -q : <<< "$cur"; then + output="${cur%%:*}:" + cur="${cur#*:}" + else + output= + fi + COMPREPLY=($(compgen -f -- "$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 _swaylock swaylock -- cgit v1.2.3 From c4b4da5dc4ba9c68ff28ba2a01566b760adf1f55 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Fri, 27 Jul 2018 16:31:39 +0100 Subject: bash: add completion for swayidle --- completions/bash/swayidle | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 completions/bash/swayidle (limited to 'completions') diff --git a/completions/bash/swayidle b/completions/bash/swayidle new file mode 100644 index 00000000..a0cdc8b2 --- /dev/null +++ b/completions/bash/swayidle @@ -0,0 +1,48 @@ +# swaymsg(1) completion + +_swayidle() +{ + local cur prev + _get_comp_words_by_ref -n : cur prev + local prev2=${COMP_WORDS[COMP_CWORD-2]} + local prev3=${COMP_WORDS[COMP_CWORD-3]} + + events=( + 'timeout' + 'before-sleep' + ) + + short=( + -h + -d + ) + + if [ "$prev" = timeout ]; then + # timeout + return + elif [ "$prev2" = timeout ]; then + # timeout + COMPREPLY=($(compgen -c -- "$cur")) + return + elif [ "$prev3" = timeout ]; then + # timeout [resume ] + COMPREPLY=(resume) + # optional argument; no return here as user may skip 'resume' + fi + + case "$prev" in + resume) + COMPREPLY=($(compgen -c -- "$cur")) + return + ;; + before-sleep) + COMPREPLY=($(compgen -c -- "$cur")) + return + ;; + esac + + COMPREPLY+=($(compgen -W "${events[*]}" -- "$cur")) + COMPREPLY+=($(compgen -W "${short[*]}" -- "$cur")) + +} && +complete -F _swayidle swayidle -- cgit v1.2.3 From 52a27f1529973b7058427feddb5de32f23b1c64f Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Mon, 30 Jul 2018 16:24:46 +0100 Subject: delete references to swaygrab --- completions/zsh/_swaygrab | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 completions/zsh/_swaygrab (limited to 'completions') diff --git a/completions/zsh/_swaygrab b/completions/zsh/_swaygrab deleted file mode 100644 index 0f9846f4..00000000 --- a/completions/zsh/_swaygrab +++ /dev/null @@ -1,23 +0,0 @@ -#compdef swaygrab -#----------------- -# Description -# ----------- -# -# Completion script for swaygrab in sway wm (http://swaywm.org) -# -# ----------------------------------------------------- -# Author -# ------ -# -# * Seth Barberee -# -# ------------------------------------------ - -_arguments -s \ - '(-h --help)'{-h,--help}'[Shows help message]' \ - '(-c --capture)'{-c,--capture}'[Captures multiple frames as video and passes them to ffmpeg]' \ - '(-o --output)'{-o,--output}'[Use the specified output. If not specified then current focused output will be used]' \ - '(-v --version)'{-v,--version}'[Print the version (of swaymsg) and quit]' \ - '(-s --socket)'{-s,--socket}'[Use the specified socket path.]:files:_files' \ - '(-r --rate)'{-r,--rate}'[Specify a framerate (in fps). Used in combination with -c. Default is 30 and must be an integer]' \ - '(--raw)--raw[Instead of ImageMagick or ffmpeg, dump raw rgba data to stdout]' -- cgit v1.2.3 From 33433c64347eb0bfd7c1465a3b60579fa88ef724 Mon Sep 17 00:00:00 2001 From: Ian Fan Date: Wed, 18 Jul 2018 11:52:29 +0100 Subject: Add missing swaymsg completions --- completions/bash/swaymsg | 3 ++- completions/zsh/_swaymsg | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'completions') diff --git a/completions/bash/swaymsg b/completions/bash/swaymsg index 8ec90b6f..e4b2c1b7 100644 --- a/completions/bash/swaymsg +++ b/completions/bash/swaymsg @@ -14,7 +14,8 @@ _swaymsg() 'get_marks' 'get_bar_config' 'get_version' - 'get_clipboard' + 'get_binding_modes' + 'get_config' ) short=( diff --git a/completions/zsh/_swaymsg b/completions/zsh/_swaymsg index 2e39deb6..28de474d 100644 --- a/completions/zsh/_swaymsg +++ b/completions/zsh/_swaymsg @@ -22,6 +22,8 @@ types=( 'get_marks' 'get_bar_config' 'get_version' +'get_binding_modes' +'get_config' ) _arguments -s \ -- cgit v1.2.3 From 3edaf2ce2a8a4753c162491329a7dfa492ff7e77 Mon Sep 17 00:00:00 2001 From: Ian Fan Date: Wed, 18 Jul 2018 12:30:39 +0100 Subject: ipc: add tick event --- completions/bash/swaymsg | 1 + completions/zsh/_swaymsg | 1 + 2 files changed, 2 insertions(+) (limited to 'completions') diff --git a/completions/bash/swaymsg b/completions/bash/swaymsg index e4b2c1b7..20092bdc 100644 --- a/completions/bash/swaymsg +++ b/completions/bash/swaymsg @@ -16,6 +16,7 @@ _swaymsg() 'get_version' 'get_binding_modes' 'get_config' + 'send_tick' ) short=( diff --git a/completions/zsh/_swaymsg b/completions/zsh/_swaymsg index 28de474d..a7a1c8e0 100644 --- a/completions/zsh/_swaymsg +++ b/completions/zsh/_swaymsg @@ -24,6 +24,7 @@ types=( 'get_version' 'get_binding_modes' 'get_config' +'send_tick' ) _arguments -s \ -- cgit v1.2.3