Sway: `swaymsg output` doesn't respect quoted display name

Created on 9 Jul 2020  路  5Comments  路  Source: swaywm/sway

after starting sway, the command swaymsg output "Ancor Communications Inc ASUS VS247 E2LMTF120338" mode 1920x1080 scale 1 position 0,100 enable returns Error: Invalid output subcommand: Communications..

  • Tried with single quotes for the display identifier
  • Tried with zsh, bash, and sh shells in case it was a shell expansion thing.

According to the sway-output manpage this is the correct way to pass the identifier.

bug

All 5 comments

Yeah that's an annoying thing. I wish we could just use argv, but Sway/i3 performs splitting again when swaymsg is called. So you'd need to do this instead:

swaymsg 'output "Ancor Communications Inc ASUS VS247 E2LMTF120338" mode 1920x1080 scale 1 position 0,100 enable'

thanks for the fast response! Unfortunately that still doesn't work:

禄 swaymsg 'output "Ancor Communications Inc ASUS VS247 E2LMTF120338" mode 1920x1080 scale 1 position 0,100 enable'
Error: Missing position argument (y).

Same error when I move the single quotes to start before the model name '"Ancor Communications..., and if I end the single quote after the model name.

Happy to submit a docs PR when we sort this out. :)

You'll need to wrap the 0,100 in quotes as well since commas are used as command separators. Replacing that comma with a space is also supported.

Thank you for your help! Linked a PR adding a note about this to the swaymsg manpage.

Thanks. Closing because this isn't a bug.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ddevault picture ddevault  路  3Comments

johanhelsing picture johanhelsing  路  3Comments

soymjolk picture soymjolk  路  3Comments

dnkl picture dnkl  路  4Comments

emersion picture emersion  路  4Comments