Commit graph

40 commits

Author SHA1 Message Date
ba0df4328a Enable screen edge effect in convergence mode
The top-left hot corner triggers KWin Overview but the visual
feedback was unconditionally disabled. Enable the screenedge
effect alongside overview when convergence mode is active so
mouse users get the expected desktop hot-corner behavior.
2026-04-09 10:41:50 +02:00
5dfae0c45c Add task strip and Overview to navigation panel
In convergence mode, show a running-app icon strip in the navigation
panel using the existing TaskManager.TasksModel. Each icon activates
its window on click, with an indicator dot for the active window.

Replace the mobile task switcher button with a KWin Overview trigger:
add triggerOverview() to TaskPanel (D-Bus call to kglobalaccel), swap
the button icon to view-grid-symbolic, and enable the Overview effect
in the envmanager KWin config when convergence mode is active.

Wire convergenceMode and taskModel properties from
NavigationPanelComponent through to NavigationPanel so the task strip
populates from the existing TasksModel instance.
2026-04-08 19:07:37 +02:00
Devin Lin
1705d6c187 envmanager: Add KDE Connect SMS to applications blocklist
This application isn't really relevant to mobile, but it's included whenever KDE Connect is installed.
2026-02-16 21:50:15 -05:00
Devin Lin
afa2f06b47 envmanager: Attempt to autodetect device id
Attempt to use `/sys/firmware/devicetree/base/compatible` to autodetect
the device id for device profiles. This approach is described here: https://phosh.mobi/posts/notch-support/#the-compatibles-string
2025-12-15 20:58:31 -05:00
Devin Lin
3f0b0f1454 Switch from maliit-keyboard to plasma-keyboard
Now that plasma-keyboard has had its first release, we can switch to it
as the default keyboard and drop maliit-keyboard (and its Qt 5 dependency).

We also drop the maliit-keyboard kcm here (moved to
https://invent.kde.org/devinlin/maliit-keyboard-kcm), which is replaced by the one
installed by plasma-keyboard.
2025-12-04 10:06:21 -05:00
Devin Lin
839d5e2bff panels: Add support for defining device specific panel tweaks
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`.
2025-11-04 23:08:18 -05:00
Luis Büchi
90abaad9c8 envmanager: stop loading mobile config when desktop one should be 2025-10-28 03:21:13 +01:00
Devin Lin
09715da168 envmanager: Use config overlay for applications-blacklistrc
Use a config overlay for applications-blacklistrc, so that new options
that we add are updated in installs. This brings it inline with all of
the other config files we manage, and so I also remove unused
functionality that we used in the past to "save" and restore config
files.
2025-09-16 08:23:32 -04:00
Bart Ribbers
5c404c0f0d envmanager: blacklist the DrKonqi coredump GUI
Although useful for developers, it doesn't really make sense to show it
to most users and it doesn't actually look that great in the launcher.
It can be still be launched through krunner if necessary.
2025-09-15 15:44:50 -04:00
Devin Lin
8fa5d1e053 envmanager: Allow user to change the vkbd
Currently the vkbd setting (to maliit) is immutable, preventing users
from selecting different input methods. Loosen the envmanager setting so
that it's just a default value, which can be overriden by users.
2025-07-25 16:21:38 -04:00
Devin Lin
ab3f7243ec envmanager: Use BorderlessMaximizedWindows option
This allows for the window decorations to not be drawn on initial window
open, so we don't have to rely on our KWin script (which has a slight
delay).
2025-06-30 17:09:23 -04:00
Devin Lin
92a1cfc740 envmanager: Write options as immutable, and add kdeglobals
This commit writes options as immutable to the config file ([$i]
suffix), so that user defined options from desktop do not override our
specified mobile settings.

This commit also moves kdeglobals settings to be written to
~/.config/plasma-mobile/kdeglobals rather than directly to
~/.config/kdeglobals, continuing the work from
!723

Fixes https://invent.kde.org/plasma/plasma-mobile/-/issues/467
2025-06-13 07:16:18 -04:00
Devin Lin
0e6221ce52 envmanager: Add overlay configs through XDG_CONFIG_DIRS
We currently directly write our settings to ~/.config/kwinrc and ~/.config/ksmserver.

Instead, create a separate config file with our settings (in ~/.config/plasma-mobile), and in startplasmamobile, add that path to XDG_CONFIG_DIRS. These options will be applied in the mobile session, unless the user explicitly sets the config option.
2025-05-22 23:12:43 -04:00
Devin Lin
9c2e2c7db3 Revert "envmanager: Handle SSD toggling with kwin rules"
This reverts commit c45f9ed446.

The kwin rules setting causes all desktop windows to have window decorations. Revert this for now until we figure out a solution.
2025-04-24 11:28:49 +02:00
Devin Lin
c45f9ed446 envmanager: Handle SSD toggling with kwin rules
Replace the convergentwindows KWin script SSD toggling with KWin rules to ensure
windows are maximized and have no window border (and toggle off for
docked mode). KWin rules work immediately at window creation, which is
more efficient than listening to window creation events and manually
changing properties on them.

Currently, window rules setting maximization don't seem to address all cases where a window gets unmaximized, so for the time being we will still need the logic in convergentwindows to handle any sidecases.
2025-03-21 16:00:12 +00:00
Luis Büchi
d7ae1917af envmanager: disable session restore for mobile
session restore could lead to soft lock since dialer can open
on top of the login screen.
2024-12-20 22:32:29 +01:00
Devin Lin
b3c7f418d7 envmanager: Ensure KWin is reloaded
We need to also call a workspace reconfigure to ensure settings are
properly applied live.
2024-11-15 03:45:48 +00:00
Devin Lin
6e7376990b envmanager: Toggle interactive window moving
Fixes https://invent.kde.org/plasma/plasma-mobile/-/issues/340

This toggles whether interactive window moving is enabled based on
whether docked mode is enabled.

Requires https://invent.kde.org/plasma/kwin/-/merge_requests/6745
2024-11-08 03:03:41 +00:00
Luis Büchi
2d47217829 disable electric border highlighting by default in envmanager 2024-11-05 09:03:45 +01:00
Devin Lin
051e8b7903 envmanager: Fix KWin effect and script reloading
Previously, we had a silent failure of the dbus call to "reloadConfig"
which turned out to be a signal and not a method that we can call. To
reload effects, we need to manually call dbus to load and unload each
individual one. A similar situation exists for scripts, except that we
only unload scripts through individual calls, and call `start` to load
all of the enabled scripts at once.
2024-10-31 20:33:13 +00:00
Nicolas Fella
d69839f202 Remove unused includes 2024-07-14 01:19:42 +02:00
Devin Lin
a58144fb18 taskswitcher: Only enable KWin effect in mobile, have it be managed by envmanager 2024-07-03 11:54:19 -04:00
Devin Lin
2fae8b3381 envmanager: Ensure KConfigGroup being written to is not derived from const
This otherwise causes an assertion failure if assertions are enabled.
2024-06-26 13:15:57 -04:00
Plata Hill
680143fed4 envmanager: Update default applications-blacklistrc
Sort list alphabetically and add applications that might typically exist in a Plasma Mobile environment (e.g. Waydroid).
2024-06-23 22:38:10 +00:00
Devin Lin
68bd204e36 envmanager: Set Placement mode for KWin to skip window maximize animation when not in docked mode
We can use the placement mode setting in KWin to bypass the need to "maximize" after the window opens, KWin does this for us.

We keep the kwin maximize script to enforce docked mode changing window maximization (since the policy only affects new windows).
2024-03-09 04:20:12 +00:00
Carl Schwan
d63e5e04f5
envmanager: Fix some for-loop
Avoid detaching
2024-01-22 16:33:41 +01:00
Carl Schwan
d9330ad10d Fix crash in envmanager
To delete an entry, we need to ensure the KConfigGroup and none of its
parent config group is not const otherwise we it an assert in KConfig.
2024-01-21 22:11:08 +00:00
Carl Schwan
d161292426
Use new Qt6 QStringLiteral operator
Shorter than typing QStringLiteral all the time
2024-01-17 01:07:31 +01:00
Carl Schwan
b070f6e3f7
Use a reference for the singleton
This is a bit nicer to work with than a pointer and doesn't require a
heap allocation.
2024-01-17 01:02:51 +01:00
Devin Lin
0b45b5ed69 envmanager: Explicitly enable kdecoration plugin
Upgrading on pmOS from Plasma 5, where we used to ship custom configs seems to have kwin get stuck having the kdecoration plugin disabled. Manually enable it.
2023-12-29 15:44:26 -05:00
Devin Lin
7056649bf4 envmanager: Ensure that lnf is not constantly reapplied, overwriting user settings 2023-12-08 19:09:26 -08:00
Devin Lin
630a85cbcb bin: Ensure that plasma-mobile-envmanager is run prior to shell start 2023-11-23 10:28:19 -08:00
Devin Lin
1542764d2c envmanager: Turn off tablet mode when in docked mode 2023-11-22 23:17:18 -08:00
Devin Lin
df80fb65fc Revert "envmanager: Manually specify window placement and decoration settings when not in docked mode"
This reverts commit ff4d501a7b.
2023-10-21 21:44:18 -07:00
Devin Lin
ff4d501a7b envmanager: Manually specify window placement and decoration settings when not in docked mode 2023-10-18 08:13:58 -07:00
Devin Lin
5c0fd57600 initialstart: Add first login experience
Adds an experience for users on first login, allowing some basic configuration.

This is separate from a first start wizard, which would run as a separate user with elevated permissions, and include options that an installer would have.
2023-04-01 07:09:57 +00:00
Devin Lin
372626b786 taskswitcher: Restore status bar and navigation panel 2023-03-31 22:10:02 -07:00
Devin Lin
f46986a9ed envmanager: Ensure keys are deleted 2023-03-30 08:42:28 -07:00
Devin Lin
30c951473e envmanager: Ensure that it is not a graphical application 2023-03-29 22:43:44 -07:00
Devin Lin
3e1e1e7d22 envmanager: Extract kded settings management to separate app, add window decoration customization 2023-03-29 19:41:10 -07:00