Unix & Linux Asked on November 17, 2021
I’m using a KDE+i3
setup on my machine and therefore I want to disable all the global hotkeys provided by KDE, since I’ve binded the keys properly in my i3-config.
Upon exploring qdbus
API, I’ve found out the command works per Plasma session:
qdbus org.kde.kglobalaccel /kglobalaccel blockGlobalShortcuts true
The issue is how to begin with its automation. The following are the issues:
exec --no-startup-id qdbus org.kde.kglobalaccel /kglobalaccel
blockGlobalShortcuts true
for now but only works till Plasma doesn’t restart.
How should I proceed with implementing this?
I've found a way to disable all the global shortcuts of KDE. Here's what I did:
~/.config/kglobalshortcutsrc
in the form of foo=bar
assignments.sed
, replace the hotkeys.kglobalaccel
to observe the changes.Here's the script:
#!/bin/sh
hotkeysRC="$XDG_CONFIG_HOME/kglobalshortcutsrc"
# Remove application launching shortcuts.
sed -i 's/_launch=[^,]*/_launch=none/g' $hotkeysRC
# Remove other global shortcuts.
sed -i 's/^([^_].*)=[^,]*/1=none/g' $hotkeysRC
# Reload hotkeys.
kquitapp5 kglobalaccel && sleep 2s && kglobalaccel5 &
Now I can finally move all of my key bindings to i3 config!
Answered by Utkarsh Verma on November 17, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP