This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
So sway has a ton of commands -- more than i3 since it's responsible for input and output devices as well. swaymsg
is a nice client, but for me its easy to forget the names and arguments of the sway commands themselves.
That's why I've made some extended zsh completions for swaymsg to support them.
There are still some changes/features I'd like to implement, but they are working pretty well for me already, so I thought I'd share.
Some loose goals:
- complete sway commands and their arguments
- complete sway input/output device names and options
- complete sway criteria predicates where appropriate
- document options with descriptions from the man page and elsewhere, so you know what you're completing.
You'll need jq
to complete most input/output device stuff, and you'll need xsltproc
(libxslt) to complete the xkb stuff, but it should do its best without, and shouldn't error without them. Everything else should work fine without.
Here are some example screenshots of it completing stuff:
There are plenty more things to complete, but you get the idea.
If you're a zsh user, check them out. Just put the completions somewhere early in your fpath to override the basic completions shipped with sway. I like to use ${XDG_DATA_HOME:-$HOME/.local/share}/zsh/completions/
for this purpose. Not super well tested yet, so if you find a bug or have a suggestion, let me know. I'll probably continue to update them for a bit.
Subreddit
Post Details
- Posted
- 5 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/swaywm/comm...