alex-courtis / way-displays

way-displays: Auto Manage Your Wayland Displays
MIT License
239 stars 12 forks source link

Feature: remember multiple monitor configurations #175

Open gpayer opened 1 week ago

gpayer commented 1 week ago

At the moment exactly one configuration can be saved. Unfortunately this quickly hits a limit if you regularly have different non-changing monitor configuration, e.g. a notebook with a home office configuration and a workplace configuration.

At home I have two monitors and the notebook is the third monitor on the right. At the office I have one big monitor and the notebook is on the left. Before I switched to Wayland autorandr took care of this, it saved configurations based on the monitor setup.

My feature idea: allow multiple configurations in cfg.yaml, each under a separate key representing the monitor configuration. This might either be a hash built from the monitor descriptions, or a unique key from a new section, where monitor configurations are explicitly saved.

One possible hash function would be to sort all monitor descriptions alphabetically and send them through a sha256 hasher.

heyzec commented 1 week ago

Would the potential profiles feature help with that? https://github.com/alex-courtis/way-displays/issues/83

gpayer commented 1 week ago

@heyzec hm, there are similarities. The main difference is probably, that these proposed profiles are configured manually and the key for a specific configuration is calculated automatically.

alex-courtis commented 1 week ago

One possible hash function would be to sort all monitor descriptions alphabetically and send them through a sha256 hasher.

This is a good idea. For transparency/manual setup we could even just use the unhashed descriptions as the key.