It would be nice if I could tell kanshi "this, right here, is how I want things setup, please save this profile as name 'external-monitor'".
This is something autorandr does I really appreciate, because I could set the profile the way I want graphically (with arandr then, but with wdisplays now) and not have to mess around with questions like "wait, how large is this monitor again?" to figure out how to place things around...
thanks, this thing works otherwise surprisingly well. :)
Interesting idea!
Where does autorandr save the profile? kanshi has a main configuration file, and doesn't include any other file by default. Appending is risky, because saving the same profile twice will result in it appearing twice in the config file.
On 2023-03-06 15:30:22, outgoing@sr.ht wrote:
Interesting idea!
Where does autorandr save the profile?
In ~/.config/autorandr/PROFILENAME
kanshi has a main configuration file, and doesn't include any other file by default. Appending is risky, because saving the same profile twice will result in it appearing twice in the config file.
Oh, right, of course!
Hmm.. that's a good point, I guess I have already cargo-culted / forward-ported autorandr's way of doing things. My ~/.config/kanshi/config is simply:
include ~/.config/kanshi/*.conf
.. and then each profile is in its own individual file.
You might find perusing the autorandr manpage interesting:
https://manpages.debian.org/bullseye/autorandr/autorandr.1.en.html
... it has a crude CRUD interface there (well, load/save/remove) there.
how do we upvote things on sourcehut?
i've been thinking about this again since i was in a situation where i wanted to save my current configuration to kanshi. what i did was open
wdisplays
to set the configuration just so, then i was stuck there. i ranwlr-randr
to dump the output and moved on, thinking i would manually generate a kanshi config file when i wanted to catch up.but then i found out about nwg-displays which has this interesting feature of saving profiles as sway-compatible output blobs. then it struck me that if kanshi could read such fiels, it could just reuse the same configuration data as sway itself, which would be pretty useful on its own!
have you considered supporting the sway output configuration syntax?
thanks!
The Sway config file format has a lot of historical baggage, so I'd rather not replicate it.
libscfg now supports writing files.