cmd_output: support current output alias

Similar to seat command, this provides an alias for the current output.
Instead of the output name or identifier, `-` can be used to operate on
the focused output by name and `--` can be used to operate on the
focused output by its identifier. This will prevent operating on the
no-op output when using either alias.
This commit is contained in:
Brian Ashworth 2019-07-17 19:48:28 -04:00 committed by Drew DeVault
parent 37308f6549
commit 92b22ee9ea
2 changed files with 29 additions and 2 deletions

View file

@ -11,7 +11,9 @@ You may combine output commands into one, like so:
output HDMI-A-1 mode 1920x1080 pos 1920,0 bg ~/wallpaper.png stretch
You can get a list of output names with *swaymsg -t get_outputs*. You may also
match any output by using the output name "\*".
match any output by using the output name "\*". Additionally, "-" can be used
to match the focused output by name and "--" can be used to match the focused
output by its identifier.
Some outputs may have different names when disconnecting and reconnecting. To
identify these, the name can be substituted for a string consisting of the make,