mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 22:33:08 +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`.
47 lines
1.6 KiB
Text
47 lines
1.6 KiB
Text
# SPDX-FileCopyrightText: 2025 Devin Lin <devin@kde.org>
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
[Device]
|
|
# The name of the device.
|
|
name=My Phone
|
|
|
|
# Dimensions for a panel (fallback for any of the options below)
|
|
[Panels]
|
|
statusBarHeight=
|
|
navigationPanelHeight=
|
|
centerSpacing=
|
|
leftPadding=
|
|
rightPadding=
|
|
|
|
# Dimensions for a panel if it is mounted on the top of the device
|
|
[Panels][Top]
|
|
statusBarHeight= # The status bar height in pixels if it is mounted on the top side of the device (from its natural orientation).
|
|
navigationPanelHeight= # The navigation bar height in pixels if it is mounted on the top side of the device (from its natural orientation).
|
|
centerSpacing= # The amount of space in pixels to reserve in the center for panels mounted on the top side of the device (for notches, punch holes).
|
|
leftPadding= # The left padding in pixels of panels mounted on the top side of the device (from its natural orientation).
|
|
rightPadding= # The right padding in pixels of panels mounted on the top side of the device (from its natural orientation).
|
|
|
|
# Dimensions for a panel if it is mounted on the bottom of the device
|
|
[Panels][Bottom]
|
|
statusBarHeight=
|
|
navigationPanelHeight=
|
|
centerSpacing=
|
|
leftPadding=
|
|
rightPadding=
|
|
|
|
# Dimensions for a panel if it is mounted on the left of the device (landscape)
|
|
[Panels][Left]
|
|
statusBarHeight=
|
|
navigationPanelHeight=
|
|
centerSpacing=
|
|
leftPadding=
|
|
rightPadding=
|
|
|
|
# Dimensions for a panel if it is mounted on the right of the device (landscape)
|
|
[Panels][Right]
|
|
statusBarHeight=
|
|
navigationPanelHeight=
|
|
centerSpacing=
|
|
leftPadding=
|
|
rightPadding=
|
|
|