From bcc72911457232a2851b923f803ca21674b8297e Mon Sep 17 00:00:00 2001 From: Rudis Muiznieks Date: Mon, 10 Apr 2023 18:54:23 -0500 Subject: [PATCH] shortcut setup script --- kde/clear-shortcuts | 16 ++++++++++++++++ kde/kde-shortcuts.kksrc | 3 +++ 2 files changed, 19 insertions(+) create mode 100755 kde/clear-shortcuts diff --git a/kde/clear-shortcuts b/kde/clear-shortcuts new file mode 100755 index 0000000..aac6db4 --- /dev/null +++ b/kde/clear-shortcuts @@ -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 & diff --git a/kde/kde-shortcuts.kksrc b/kde/kde-shortcuts.kksrc index 7751f00..3d86d99 100644 --- a/kde/kde-shortcuts.kksrc +++ b/kde/kde-shortcuts.kksrc @@ -38,3 +38,6 @@ _launch=Meta+Return [yakuake][Global Shortcuts] toggle-window-state=Meta+` + +[org.kde.krunner.desktop][Global Shortcuts] +_launch=Meta+Space