skynet/kde/clear-shortcuts

17 lines
476 B
Bash
Executable File

#!/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 &