コンテンツにスキップ

KDE Plasma

このコンテンツはまだ日本語訳がありません。

Utter started on niri. KDE Plasma is now a first-class target: a small compositor layer detects the session and drives KWin over D-Bus instead of niri msg, with the same voice commands on top. niri keeps its original code path; nothing changes there.

NeedPackageWhy
Plasma 6 on Waylandplasma-desktopprimary target; Plasma 5 and X11 are best-effort
gdbus or qdbus6 or dbus-sendglib2 / qt6-tools / dbusevery call to KWin; gdbus preferred
spectaclespectaclescreenshots for the vision tier (grim does not work on KWin)
ydotool + ydotooldydotooltyping and key chords (wtype has no protocol on KWin)
kdotool (recommended)AUR / Fedora kdotoolwindow list and per-window actions without KWin scripts
kscreen-doctor (optional)libkscreenmonitor geometry for screenshots

You do not need niri, grim or wtype on Plasma. The installer’s dependency list and the settings app’s System tools adapt automatically.

Utter reads the session environment and picks a backend. First match wins:

  1. XDG_CURRENT_DESKTOP contains niri → niri; contains KDE → KWin
  2. KDE_FULL_SESSION=true or KDE_SESSION_VERSION → KWin
  3. XDG_SESSION_DESKTOP / DESKTOP_SESSION is plasma…, kde, kde-plasma (or contains niri)
  4. NIRI_SOCKET set → niri
  5. otherwise: unknown. Window actions report unsupported; dictation, typing and launching still work.

Force a backend in ~/.config/utter/config.toml:

[general]
compositor = "auto" # auto | niri | kwin
ConcernPlasma backend
Focused window, window listkdotool, or a tiny KWin script loaded via org.kde.kwin.Scripting that reports back over D-Bus
Focus / close / minimize / move to desktopkdotool or the script (by window); org.kde.kglobalaccel shortcuts for the focused window (Window Close, Window Minimize, Window to Desktop 3…)
Maximizeactivate the window, then Window Maximize
Virtual desktopsorg.kde.KWin /KWin setCurrentDesktop, org.kde.KWin.VirtualDesktopManager
“focus left”, “move window right”, “next desktop”…mapped from the niri action names to KWin shortcuts (Switch Window Left, Window Quick Tile Right, Switch to Next Desktop)
Screenshotsspectacle -b -n -f -o <png>, then the XDG screenshot portal, then grim
Clipboardorg.kde.klipper getClipboardContents, then wl-paste
Typing and key chordsydotool, then wtype

Phrases that only make sense on a scrollable tiler (“float window”, “tabbed column”, “consume into column”, “last used workspace”) return a structured unsupported result on Plasma instead of failing, so the assistant can fall back to the next tier.

[kwin]
screenshot = "auto" # auto | spectacle | portal | grim
clipboard = "auto" # auto | klipper | wl-clipboard
use_kdotool = true # prefer kdotool for window queries/actions when installed
use_scripts = true # otherwise load a tiny KWin script for window queries
script_timeout_s = 3.0
pointer_abs_factor = 1.0 # ydotool absolute-pointer multiplier (niri uses 0.5)

Troubleshooting → Desktop shows the detected compositor (with the environment variable that decided it), the active backend or the config override that chose it, the session type, and one row per capability (focused window, window list, focus, close, minimise, maximise, move to desktop, switch desktop, screenshots, compositor commands) marked Available or Not available, with a switch to hide the unavailable rows.

Terminal window
# unit tests (no Plasma needed)
python3 tests/platform/test_compositor_detection.py
# simulate a Plasma session anywhere and print the backend + every command it would run
env -u NIRI_SOCKET XDG_CURRENT_DESKTOP=KDE KDE_FULL_SESSION=true \
python3 -m utter.context.compositor --print-plan

On a real Plasma desktop, assistant doctor prints compositor: detected kwin -> backend kwin, and python -m utter.context.compositor lists which tools were found and which capabilities are live.

  • Not run on a live Plasma yet (see the note above): kdotool output shapes, the KWin script round-trip, some Plasma 6 shortcut names on Plasma 5, the portal flow, kscreen-doctor fields and ydotool pointer scaling are the items to confirm first.
  • Structured D-Bus replies are parsed from gdbus output only; qdbus/dbus-send cover the scalar calls.
  • The Noctalia widget and on-screen display are niri-only; Plasma notifications are a follow-up.