add support for `output <name> mode --custom <mode>` wlr output set_custom_mode
(work in progress, doesn't seem to work yet for me)
using this config:
profile undocked {
output LVDS-1 enable
}
profile docked {
output LVDS-1 position 0,768
output HDMI-A-2 mode --custom 1360x768 position 0,0
}
I get the prints
applying profile 'docked'
applying profile output 'LVDS-1' on connected head 'LVDS-1'
applying profile output 'HDMI-A-2' on connected head 'HDMI-A-2'
setting custom HDMI-A-2
width 1360
height 768
refresh 0
but sway thinks otherwise
$ swaymsg -t get_outputs | jq '.[] | "\(.name) \(.current_mode)"'
"LVDS-1 {\"width\":1366,\"height\":768,\"refresh\":60103}"
"HDMI-A-2 {\"width\":1280,\"height\":800,\"refresh\":59910}"
Works fine for me on river, so I'd say your code works.
Can you obtain Sway debug logs?
I just tested on Sway (1.6) and it works there too. Perhaps this was just an issue with the Sway version @sentriz used.
@sentriz Ping.
If you don't have any interest in this PR anymore, I can pick it up if you like.
@sentriz Ping.
If you don't have any interest in this PR anymore, I can pick it up if you like.
Cool, please feel free to. I got fancy new monitors that don't need the custom stuff 😁
Ok, cleaned up your commit a bit: https://github.com/Leon-Plickat/kanshi
Interestingly it no longer works for me with sway 1.6. Since wlr-randr custom modes work neither on sway, but both work fine on river, I think this is a sway bug.