nwg-piotr / nwg-displays

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

[feature] change screen resolution like Chrome OS #9

Open tulequ opened 1 year ago

tulequ commented 1 year ago

ChromeOS has following feature https://support.google.com/chromebook/answer/183101?hl=en

Action Hot key
Change screen resolution Shift + Ctrl and + or - (minus)
Reset screen resolution to default Shift + Ctrl + 0
Rotate screen 90 degrees Shift + Ctrl + Rotate

Actually, it change SCALE (not resolution)

Can we add command like below to set it dynamic by bind hotkeys? It will be awesome

nwg-displays set-scale +0.2
nwg-displays set-scale 1
nwg-displays transform ...

The command only effect to focused display

nwg-piotr commented 1 year ago

LOL, can't confirm, as my Chromebook has been running Debian for over a year. :rofl:

I'm not sure if one needs nwg-displays to achieve this. Maybe just a script would be enough?

tulequ commented 1 year ago
LOL, can't confirm, as my Chromebook has been running Debian for over a year. rofl

I have a pixelbook. I don't know what other user do, but I use that key very much

I'm not sure if one needs nwg-displays to achieve this. Maybe just a script would be enough?

sure, I can do it. It only my opinion But I can also write a script to config display (actually I used this script about three years)

nwg-piotr commented 1 year ago

Maybe, due to the ~/.config/sway/outputs file, it should be done here anyway. Let me get back to it in a few days, when my current work is finished.

tulequ commented 1 year ago

Take a look when you have time :)

Sure, if I use nwg-displays, my script must edit outputs file for persistent

One more thing, in chromeos when I up/down resolution, (I think) it scale to supported resolution by display (without flickering), not by a float number

nwg-piotr commented 1 year ago

I use 3 full HD displays, so have no experience with scaling. Tried fractional scaling, just out of curiosity, but it didn't look well.

tulequ commented 1 year ago

Sure, scale not always have good result Usually, I must calc in revert, like 2560x1440 to 1600x? --> good scale = 1.25 (I based on available modes to calc it) 2560 to 1920 --> good scale = 1.33333

In nwg-displays, I see it only use linear scale I think it should provide a list of recommend like

This list will be calc for each display

nwg-piotr commented 1 year ago

In nwg-displays, I see it only use linear scale

You may choose from linear, nearest and smart.

image