diff --git a/contrib/remove_keyboard_shortcuts.sh b/contrib/remove_keyboard_shortcuts.sh new file mode 100644 index 00000000..cadf4de2 --- /dev/null +++ b/contrib/remove_keyboard_shortcuts.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +# SPDX-FileCopyrightText: 2021 Nicolas Vaughan +# +# SPDX-License-Identifier: CC-BY-NC-4.0 + +read -r -p "Do you want to remove Bitmuth's keyboard shortcuts? [Y/n] " response +response=${response,,} # tolower +if [[ $response =~ ^(yes|y| ) ]] || [[ -z $response ]]; then + sed -i -r 's/^bismuth.+//g' ~/.config/kglobalshortcutsrc + # remove the multiple newlines left by sed + sed -i -r ':a;N;$!ba;s/\n{3,}/\n\n/g' ~/.config/kglobalshortcutsrc +fi \ No newline at end of file