From fcd007155552376fa5c482d5d650b90f9a7e172e Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Sun, 17 Jan 2016 22:06:26 -0600 Subject: added basic zsh shell completion for sway, swaybg, and swaygrab --- completions/zsh/CMakeLists.txt | 4 ++++ completions/zsh/_sway | 28 ++++++++++++++++++++++++++++ completions/zsh/_swaygrab | 28 ++++++++++++++++++++++++++++ completions/zsh/_swaymsg | 26 ++++++++++++++++++++++++++ 4 files changed, 86 insertions(+) create mode 100644 completions/zsh/CMakeLists.txt create mode 100644 completions/zsh/_sway create mode 100644 completions/zsh/_swaygrab create mode 100644 completions/zsh/_swaymsg (limited to 'completions') diff --git a/completions/zsh/CMakeLists.txt b/completions/zsh/CMakeLists.txt new file mode 100644 index 00000000..561636f2 --- /dev/null +++ b/completions/zsh/CMakeLists.txt @@ -0,0 +1,4 @@ +install( + FILES _sway _swaymsg _swaygrab + DESTINATION share/zsh/site-functions/ +) diff --git a/completions/zsh/_sway b/completions/zsh/_sway new file mode 100644 index 00000000..a9b1a14f --- /dev/null +++ b/completions/zsh/_sway @@ -0,0 +1,28 @@ +#compdef sway +#------------ +# Description +# ----------- +# +# Completion script for the sway window manager (http://swaywm.org) +# +# --------------------------------------------- +# Author +# ------- +# +# * Seth Barberee +# +# ------------------------------- + +_sway() { + local -a options + options=('--version:shows version' + '--help:shows help message' + '--config:Specify a config file different than $HOME/.config/sway/config' + '--validate:Check validity of the config file, then exit' + '--debug:Enables full logging, including debug information' + '--verbose:Enables more verbose logging' + '--get-socketpath:Gets the IPC socket path and prints it, then exits' + ) + _describe 'values' options + } +_sway "$@" diff --git a/completions/zsh/_swaygrab b/completions/zsh/_swaygrab new file mode 100644 index 00000000..64d9d2c8 --- /dev/null +++ b/completions/zsh/_swaygrab @@ -0,0 +1,28 @@ +#compdef swaygrab +#----------------- +# Description +# ----------- +# +# Completion script for swaygrab in the sway wm (http://swaywm.org) +# +# ----------------------------------------------------- +# Author +# ------ +# +# * Seth Barberee +# +# ------------------------------------------ + +_swaygrab() { + local -a options + options=('--version:shows version' + '--help:shows help message' + '--capture:Captures multiple frames as video as passes into ffmpeg until SIGTERM (ctrl+c) is sent to swaygrab' + '--output:Use the specified output. If no output is defined, the currently focused output in sway is used' + '--socket:Use the specified socket path. Otherwise, swayuses $SWAYSOCK then $I3SOCK' + '--rate:Specify a framerate (in fps). Used in combination with -c. Default is 30 and must be an integer' + '--raw:Instead of ImageMagick or ffmpeg, dump raw rgba data to stdout' + ) + _describe 'values' options + } +_swaygrab "$@" diff --git a/completions/zsh/_swaymsg b/completions/zsh/_swaymsg new file mode 100644 index 00000000..5d9277c4 --- /dev/null +++ b/completions/zsh/_swaymsg @@ -0,0 +1,26 @@ +#compdef swaymsg +#----------------- +# Description +# ----------- +# +# Completion script for swaymsg in sway wm (http://swaywm.org) +# +# ------------------------------------------------------ +# Author +# -------- +# +# * Seth Barberee +# +# ------------------------------------------- + +_swaymsg() { + local -a options + options=('--version:shows version' + '--help:shows help message' + '--quiet:sends the IPC message but does not print the response from sway' + '--socket:Use the specified socket path. Otherwise, swaymsg uses $SWAYSOCK then $I3SOCK' + '--type:Specify the type of IPC message. Tab completion still coming so use the man page instead' + ) + _describe 'values' options + } +_swaymsg "$@" -- cgit v1.2.3