From 4f57c3da0ee00978e56190e2015482a041e48e82 Mon Sep 17 00:00:00 2001 From: Martin Kalchev Date: Sun, 26 Aug 2018 18:53:51 +0300 Subject: [PATCH 1/2] added untested files --- completions/fish/sway.fish | 10 ++++++++++ completions/fish/swaylock.fish | 11 +++++++++++ completions/fish/swaymsg.fish | 8 ++++++++ meson_options.txt | 1 + 4 files changed, 30 insertions(+) create mode 100644 completions/fish/sway.fish create mode 100644 completions/fish/swaylock.fish create mode 100644 completions/fish/swaymsg.fish diff --git a/completions/fish/sway.fish b/completions/fish/sway.fish new file mode 100644 index 000000000..31165ef4f --- /dev/null +++ b/completions/fish/sway.fish @@ -0,0 +1,10 @@ +# sway(1) completion + +complete -c sway -s h -l help --description "Show help message and quit." +complete -c sway -s c -l config --description "Specifies a config file." +complete -c sway -s C -l validate --description "Check the validity of the config file, then exit." +complete -c sway -s d -l debug --description "Enables full logging, including debug information." +complete -c sway -s v -l version --description "Show the version number and quit." +complete -c sway -s V -l verbose --description "Enables more verbose logging." +complete -c sway -l get-socketpath --description "Gets the IPC socket path and prints it, then exits." + diff --git a/completions/fish/swaylock.fish b/completions/fish/swaylock.fish new file mode 100644 index 000000000..965a22d2b --- /dev/null +++ b/completions/fish/swaylock.fish @@ -0,0 +1,11 @@ +# swaylock(1) completion + +complete -c swaylock -s h -l help --description "Show help message and quit." +complete -c swaylock -s c -l color --description "Turn the screen into the given color. If -i is used, this sets the background of the image into the given color. Defaults to white (ffffff), or transparent (00000000) if an image is in use." +complete -c swaylock -s f -l daemonize --description "Fork into the background after spawning. Note: this is the default bahavior of i3lock." +complete -c swaylock -s i -l image --description "Display the given image, optionally on the given output. Use -c to set a background color." +complete -c swaylock -l scaling --description "Scaling mode for images: stretch, fill, fit, center, or tile." +complete -c swaylock -s t -l tiling --description "Same as --scaling=tile." +complete -c swaylock -s u -l no-unlock-indicator --description "Disable the unlock indicator." +complete -c swaylock -s v -l version --description "Show the version number and quit." +complete -c swaylock -l socket --description "Use the specified socket path. Othherwise, swaymsg will as sway where the socket is (which is the value of $SWAYSOCK, then of $I350CK)." diff --git a/completions/fish/swaymsg.fish b/completions/fish/swaymsg.fish new file mode 100644 index 000000000..e798db77c --- /dev/null +++ b/completions/fish/swaymsg.fish @@ -0,0 +1,8 @@ +# swaymsg(1) completion + +complete -c swaymsg -s h -l help --description "Show help message and quit." +complete -c swaymsg -s q -l quiet --description "Sends the IPC message but does not print the response from sway." +complete -c swaymsg -s r -l raw --description "Use raw output even if using tty." +complete -c swaymsg -s s -l socket --description "Use the specified socket path. Otherwise, swaymsg will ask where the socket is (which is the value of $SWAYSOCK, then of $I3SOCK)." +complete -c swaymsg -s t -l type --description "Specify the type of IPC message." +complete -c swaymsg -s v -l version --description "Print the version (of swaymsg) and quit." diff --git a/meson_options.txt b/meson_options.txt index 7a23c206a..5e54607f7 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -2,4 +2,5 @@ option('sway_version', type : 'string', description: 'The version string reporte option('default_wallpaper', type: 'boolean', value: true, description: 'Install the default wallpaper.') option('zsh_completions', type: 'boolean', value: true, description: 'Install zsh shell completions.') option('bash_completions', type: 'boolean', value: true, description: 'Install bash shell completions.') +option('fish_completions', type: 'boolean', value: true, description: 'Install fish shell completions.') option('enable-xwayland', type: 'boolean', value: true, description: 'Enable support for X11 applications') From f3c18336d208c5755e3e580f968f00bff39bb5f1 Mon Sep 17 00:00:00 2001 From: Martin Kalchev Date: Sun, 26 Aug 2018 19:27:18 +0300 Subject: [PATCH 2/2] added fish to meson.build --- meson.build | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/meson.build b/meson.build index 2a0203231..0e4b4f219 100644 --- a/meson.build +++ b/meson.build @@ -205,3 +205,14 @@ if (get_option('bash_completions')) install_data(bash_files, install_dir: bash_install_dir) endif + +if (get_option('fish_completions')) + fish_files = files( + 'completions/fish/sway.fish', + 'completions/fish/swaylock.fish', + 'completions/fish/swaymsg.fish', + ) + fish_install_dir = datadir + '/fish/completions' + + install_data(fish_files, install_dir: fish_install_dir) +endif