skynet/kde/clear-shortcuts

18 lines
501 B
Plaintext
Raw Permalink Normal View History

2023-04-10 18:54:23 -05:00
#!/bin/sh
# 1. run this script to clear all default KDE shortcuts
2023-04-14 15:51:28 -05:00
# 2. add missing applications to shortcuts config
# (yakuake, flameshot, konsole, bitwarden)
2023-04-10 18:54:23 -05:00
# 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 &