Install the GNOME shortcut this already knew how to install

install_shortcut(), remove_shortcut(), shortcut_status() and desktop_name()
were added and nothing called them: the settings window and the command line
both still went straight to the KDE ones. On GNOME, pressing Install ran
kwriteconfig6, which is not there, and the three interface strings written for
this never appeared. README said the settings window installs a GNOME or KDE
shortcut, and it installed neither.

Both callers go through the chooser now, and the status line names whichever
desktop answered.
This commit is contained in:
yusufipk
2026-08-01 20:32:07 +07:00
parent 0e6ec3aea9
commit 1544cca15c
4 changed files with 215 additions and 20 deletions
+4 -1
View File
@@ -176,7 +176,7 @@ class EvdevHotkey(QObject):
return True
# --- KDE custom shortcut --------------------------------------------------
# --- the desktop's own shortcut -------------------------------------------
def _gnome():
desktop = os.environ.get("XDG_CURRENT_DESKTOP", "").lower()
@@ -322,6 +322,9 @@ def shortcut_status(desktop_id=DESKTOP_ID):
def desktop_name():
return "GNOME" if _gnome() else "KDE"
# --- KDE ------------------------------------------------------------------
def install_kde_shortcut(shortcut, exec_command, name="Dikte: start/stop recording",
desktop_id=DESKTOP_ID):
"""Write the desktop file and the kglobalshortcutsrc entry.