alex-courtis / way-displays

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

Feature: Run shell command on display change detected #65

Open phuhl opened 1 year ago

phuhl commented 1 year ago

Hi, thanks for this great tool. It detects when plugging in a display just fine. But I'd like to run a shell script e.g. to setup the desktop background on change. My proposal would be to add to the config a line:

ON_CHANGE_CMD: <shell command here>
alex-courtis commented 1 year ago

This would be most useful.

alex-courtis commented 1 year ago

We could also dump the state to, say, /tmp/way-displays.1.state.yaml

phuhl commented 1 year ago

How would I process the state? I'd have to watch the file then, I guess?

alex-courtis commented 1 year ago

How would I process the state? I'd have to watch the file then, I guess?

IPC YAML_SCHEMAS

The command is the important part, state is just Nice To Have.

alex-courtis commented 1 year ago

71 is a better alternative to writing a state file.