nwg-piotr / nwg-displays

Output management utility for sway and Hyprland.
MIT License
336 stars 22 forks source link

Unable to deactivate a display using the Active checkbox #5

Closed alanorth closed 2 years ago

alanorth commented 2 years ago

If I uncheck a display in the "Active" section and press "Apply" the display does not turn off. It appears I need to press "Toggle" instead? I would have expected the apply button to apply the active/inactive setting.

nwg-piotr commented 2 years ago

It appears I need to press "Toggle" instead?

Yes. For sake of code simplicity I'll leave it as is.

alanorth commented 2 years ago

Oh shame. OK. Logically it makes sense to have one place to apply the settings, though (wdisplays has only has one settings apply button :yum:).

nwg-piotr commented 2 years ago

wdisplays has only has one settings apply butto

wdisplays does not save the output configuration on Apply pressed.

alanorth commented 2 years ago

wdisplays does not save the output configuration on Apply pressed.

It does for me...? I could take a video but I'd have to record it on the phone so you'd see. I'm using wdisplays-git (1.1.r0.ga9aa747-1).

nwg-piotr commented 2 years ago

What file does it save the configuration to?

alanorth commented 2 years ago

I just had a quick look at the wdisplays source and didn't see anything related to a config file, and I don't have anything in ~/.config/wdisplays or similar. And it doesn't actually remember settings (for example the on-screen overlay identifiers). So I don't think it does anything with config files.

nwg-piotr commented 2 years ago

I know. Now you know as well.

alanorth commented 2 years ago

Hi, I thought you were asking in good faith, but now I'm confused. What does the config file have to do with being able to apply all settings at once from the GUI? In wdisplays I configure all display-related settings in the GUI and press "Apply" and it applies them. Isn't that what most users would expect?

nwg-piotr commented 2 years ago

Well, the main reason I developed nwg-displays was to be able to save the output configuration to files, which afterwards are being included in the sway config file:

include outputs
include workspaces

This way you don't have to run the program on each restart.

Probably it would be possible to save both files, and also turn displays on/off, on a single "Apply" button press, but it would complicate the code quite a lot. I prefer to Keep It Simple.