Open cassidyjames opened 5 years ago
Hey Cassidy, would this mean, for example that when I plug in my 1920x1080 laptop to my 4K screen, the text-size would automatically be set and also when I unplug it? Would there be a way to ensure that the text size is saved like monitors.xml saves the other settings?
Use case: currently, I have to set the text size manually every time I plug my laptop into my 4K screen (decrease the text size as I run the 4K screen at 1x) and then increase the text size manually every time I unplug it (because otherwise I can’t read anything on the 1920x1080 screen on my laptop). Of course, the real issue here is that 1920x1080 is the wrong resolution for a 13" laptop but that’s a topic I’ll be discussing with the StarLabs folks in the future :) (The MkIV, otherwise – and with the unconventional keyboard layout aisde – is an excellent machine.)
Update: Currently, I’m looking into writing a udev
rule so I can detect monitor changes (via the drm subsystem) and run a script that sets the text-scaling-factor
accordingly. One area I’m a bit lost is that I can’t see where the “pixel doubled” setting is stored. It’s not at scaling-factor
in gsettings
(which always seems to be 0
). Watching with dconf watch /
doesn’t return any settings being set when I change it in the display manager so I guess it’s stored somewhere elementary-specific?
PS. Apologies for hijacking this thread if this is unrelated. Happy to move this somewhere better if necessary.
@davidmhewitt would be the one who is more knowledgeable about this code. Setting/restoring text size per display combination could be interesting, like GNOME Settings Daemon does for us with resolution/layout. I think that'd be a new issue for https://github.com/elementary/settings-daemon/
As noted in https://github.com/elementary/switchboard-plug-display/pull/146, we'll have to manually calculate this based on the DPI.