-
-
Notifications
You must be signed in to change notification settings - Fork 697
Add KDE Wayland native hotkey support and fix clipboard paste #486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1384,6 +1384,7 @@ class IPCHandlers { | |
| return { | ||
| isUsingGnome: this.windowManager.isUsingGnomeHotkeys(), | ||
| isUsingHyprland: this.windowManager.isUsingHyprlandHotkeys(), | ||
| isUsingKDE: this.windowManager.isUsingKDEHotkeys?.() || false, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| isUsingNativeShortcut: this.windowManager.isUsingNativeShortcutHotkeys(), | ||
| }; | ||
| }); | ||
|
|
@@ -3354,7 +3355,14 @@ class IPCHandlers { | |
|
|
||
| ipcMain.handle("get-ydotool-status", () => { | ||
| const { getYdotoolStatus } = require("./ensureYdotool"); | ||
| return getYdotoolStatus(); | ||
| const status = getYdotoolStatus(); | ||
| const { execFileSync } = require("child_process"); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: this require is inside the IPC handler so it runs on every |
||
| const isKde = (process.env.XDG_CURRENT_DESKTOP || "").toLowerCase().includes("kde"); | ||
| let hasXclip = false; | ||
| let hasXsel = false; | ||
| try { execFileSync("which", ["xclip"], { timeout: 1000 }); hasXclip = true; } catch {} | ||
| try { execFileSync("which", ["xsel"], { timeout: 1000 }); hasXsel = true; } catch {} | ||
| return { ...status, isKde, hasXclip, hasXsel }; | ||
| }); | ||
|
|
||
| ipcMain.handle("get-debug-state", async () => { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both here and in the catch block below, when KDE registration fails you set
useKDE = falseand fall back to globalShortcut, butkdeManageris still alive. Should probably also dothis.kdeManager.close()andthis.kdeManager = nullbefore falling back, otherwise you have a half-initialized manager hanging around.