skynet/kde/clear-shortcuts

18 lines
501 B
Bash
Executable File

#!/bin/sh
# 1. run this script to clear all default KDE shortcuts
# 2. add missing applications to shortcuts config
# (yakuake, flameshot, konsole, bitwarden)
# 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 &