mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
This adds support for specifying options needed to deal with phone display panel pecularities (ex. screen curves, notches, punch holes) This is implemented as settings in ~/.config/plasmamobilerc, which can set panel heights, paddings, and center spacings to duck display cutouts. The pixel values are scaling independent, and so are not affected when the display scaling is changed. This is then exposed over DBus, so that components from outside of plasmashell (ex. KWin) can access it easily without needing to connect to kscreen themselves. Each screen is exposed as a single object. Currently support is only added in the status bar and the navigation panel. Currently all screens have the settings applied. In the future, we may want to limit this just to the internal screen (?) --- This also adds a "devices" folder (in `devices/configs`) where per-device configs can be set. This is installed to `/usr/share/plasma-mobile-device-configs`. In `plasmamobilerc` (installed to `/etc/xdg/plasmamobilerc`, or `~/.config/plasmamobilerc`), envmanager will read: ```toml [Device] device=oneplus-enchilada ``` for the device config to use and write its settings to `~/.config/plasma-mobile/plasmamobilerc`.
986 B
986 B
This folder is where device-specific information is set.
Usage as a distro
As a distribution, you can ship the device preset with the image by installing a file.
In /etc/xdg/plasmamobilerc, write:
[Device]
device=oneplus-enchilada # replace with the device id
This should be a file name that exists in /usr/share/plasma-mobile-device-presets (which are the files in the configs folder).
Adding a new device config
See spec.conf for more details on the specification. If a setting is omitted in the file, then the system will use the default value.
Add a new config in configs with the device id.
In order to test your changes, install the file to /usr/share/plasma-mobile-device-presets/your-device-id.conf. Then run envmanager to apply the changes to the running system:
$ plasma-mobile-envmanager --apply-settings
$ plasmashell --replace