diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-08-26 13:55:08 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-26 13:55:08 -0400 |
commit | 6afc0590a1ad1b2d7f8276d34a607e8b61fbb6ca (patch) | |
tree | e5e4a423a3a14075735ec551587df2bb47a36d02 | |
parent | Merge pull request #2513 from RyanDwyer/rename-root-outputs (diff) | |
parent | added fish to meson.build (diff) | |
download | sway-6afc0590a1ad1b2d7f8276d34a607e8b61fbb6ca.tar.gz sway-6afc0590a1ad1b2d7f8276d34a607e8b61fbb6ca.tar.zst sway-6afc0590a1ad1b2d7f8276d34a607e8b61fbb6ca.zip |
Merge pull request #2517 from fokditkak/add_fish_completion
Add fish completion
-rw-r--r-- | completions/fish/sway.fish | 10 | ||||
-rw-r--r-- | completions/fish/swaylock.fish | 11 | ||||
-rw-r--r-- | completions/fish/swaymsg.fish | 8 | ||||
-rw-r--r-- | meson.build | 11 | ||||
-rw-r--r-- | meson_options.txt | 1 |
5 files changed, 41 insertions, 0 deletions
diff --git a/completions/fish/sway.fish b/completions/fish/sway.fish new file mode 100644 index 00000000..31165ef4 --- /dev/null +++ b/completions/fish/sway.fish | |||
@@ -0,0 +1,10 @@ | |||
1 | # sway(1) completion | ||
2 | |||
3 | complete -c sway -s h -l help --description "Show help message and quit." | ||
4 | complete -c sway -s c -l config --description "Specifies a config file." | ||
5 | complete -c sway -s C -l validate --description "Check the validity of the config file, then exit." | ||
6 | complete -c sway -s d -l debug --description "Enables full logging, including debug information." | ||
7 | complete -c sway -s v -l version --description "Show the version number and quit." | ||
8 | complete -c sway -s V -l verbose --description "Enables more verbose logging." | ||
9 | complete -c sway -l get-socketpath --description "Gets the IPC socket path and prints it, then exits." | ||
10 | |||
diff --git a/completions/fish/swaylock.fish b/completions/fish/swaylock.fish new file mode 100644 index 00000000..965a22d2 --- /dev/null +++ b/completions/fish/swaylock.fish | |||
@@ -0,0 +1,11 @@ | |||
1 | # swaylock(1) completion | ||
2 | |||
3 | complete -c swaylock -s h -l help --description "Show help message and quit." | ||
4 | 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." | ||
5 | complete -c swaylock -s f -l daemonize --description "Fork into the background after spawning. Note: this is the default bahavior of i3lock." | ||
6 | complete -c swaylock -s i -l image --description "Display the given image, optionally on the given output. Use -c to set a background color." | ||
7 | complete -c swaylock -l scaling --description "Scaling mode for images: stretch, fill, fit, center, or tile." | ||
8 | complete -c swaylock -s t -l tiling --description "Same as --scaling=tile." | ||
9 | complete -c swaylock -s u -l no-unlock-indicator --description "Disable the unlock indicator." | ||
10 | complete -c swaylock -s v -l version --description "Show the version number and quit." | ||
11 | 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 00000000..e798db77 --- /dev/null +++ b/completions/fish/swaymsg.fish | |||
@@ -0,0 +1,8 @@ | |||
1 | # swaymsg(1) completion | ||
2 | |||
3 | complete -c swaymsg -s h -l help --description "Show help message and quit." | ||
4 | complete -c swaymsg -s q -l quiet --description "Sends the IPC message but does not print the response from sway." | ||
5 | complete -c swaymsg -s r -l raw --description "Use raw output even if using tty." | ||
6 | 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)." | ||
7 | complete -c swaymsg -s t -l type --description "Specify the type of IPC message." | ||
8 | complete -c swaymsg -s v -l version --description "Print the version (of swaymsg) and quit." | ||
diff --git a/meson.build b/meson.build index 2a020323..0e4b4f21 100644 --- a/meson.build +++ b/meson.build | |||
@@ -205,3 +205,14 @@ if (get_option('bash_completions')) | |||
205 | 205 | ||
206 | install_data(bash_files, install_dir: bash_install_dir) | 206 | install_data(bash_files, install_dir: bash_install_dir) |
207 | endif | 207 | endif |
208 | |||
209 | if (get_option('fish_completions')) | ||
210 | fish_files = files( | ||
211 | 'completions/fish/sway.fish', | ||
212 | 'completions/fish/swaylock.fish', | ||
213 | 'completions/fish/swaymsg.fish', | ||
214 | ) | ||
215 | fish_install_dir = datadir + '/fish/completions' | ||
216 | |||
217 | install_data(fish_files, install_dir: fish_install_dir) | ||
218 | endif | ||
diff --git a/meson_options.txt b/meson_options.txt index 7a23c206..5e54607f 100644 --- a/meson_options.txt +++ b/meson_options.txt | |||
@@ -2,4 +2,5 @@ option('sway_version', type : 'string', description: 'The version string reporte | |||
2 | option('default_wallpaper', type: 'boolean', value: true, description: 'Install the default wallpaper.') | 2 | option('default_wallpaper', type: 'boolean', value: true, description: 'Install the default wallpaper.') |
3 | option('zsh_completions', type: 'boolean', value: true, description: 'Install zsh shell completions.') | 3 | option('zsh_completions', type: 'boolean', value: true, description: 'Install zsh shell completions.') |
4 | option('bash_completions', type: 'boolean', value: true, description: 'Install bash shell completions.') | 4 | option('bash_completions', type: 'boolean', value: true, description: 'Install bash shell completions.') |
5 | option('fish_completions', type: 'boolean', value: true, description: 'Install fish shell completions.') | ||
5 | option('enable-xwayland', type: 'boolean', value: true, description: 'Enable support for X11 applications') | 6 | option('enable-xwayland', type: 'boolean', value: true, description: 'Enable support for X11 applications') |