kanshi icon indicating copy to clipboard operation
kanshi copied to clipboard

add support for `output <name> mode --custom <mode>` wlr output set_custom_mode

Open sentriz opened this issue 6 years ago • 6 comments

(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}"

sentriz avatar Apr 21 '20 21:04 sentriz

Works fine for me on river, so I'd say your code works.

Leon-Plickat avatar Apr 14 '21 17:04 Leon-Plickat

Can you obtain Sway debug logs?

emersion avatar Apr 14 '21 17:04 emersion

I just tested on Sway (1.6) and it works there too. Perhaps this was just an issue with the Sway version @sentriz used.

Leon-Plickat avatar Apr 14 '21 17:04 Leon-Plickat

@sentriz Ping.

If you don't have any interest in this PR anymore, I can pick it up if you like.

Leon-Plickat avatar May 18 '21 10:05 Leon-Plickat

@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 😁

sentriz avatar May 18 '21 12:05 sentriz

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.

Leon-Plickat avatar May 18 '21 14:05 Leon-Plickat