shortcut setup script

This commit is contained in:
Rudis Muiznieks 2023-04-10 18:54:23 -05:00
parent 5b2ba5d9d0
commit bcc7291145
Signed by: rudism
GPG Key ID: CABF2F86EF7884F9
2 changed files with 19 additions and 0 deletions

16
kde/clear-shortcuts Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
# 1. run this script to clear all default KDE shortcuts
# 2. add missing applications to shortcuts config (bitwarden, konsole)
# 3. import kde-shortcuts.kksrc
hotkeysRC="$HOME/.config/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 &

View File

@ -38,3 +38,6 @@ _launch=Meta+Return
[yakuake][Global Shortcuts] [yakuake][Global Shortcuts]
toggle-window-state=Meta+` toggle-window-state=Meta+`
[org.kde.krunner.desktop][Global Shortcuts]
_launch=Meta+Space