skynet/kde/clear-shortcuts

17 lines
476 B
Plaintext
Raw Normal View History

2023-04-10 18:54:23 -05:00
#!/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 &