From eec9efda87525b2d68ced0d37adc85a4d94cc074 Mon Sep 17 00:00:00 2001 From: Simon Rieger Date: Sat, 12 Apr 2025 14:30:51 +0200 Subject: [PATCH] switch Apple Keyboard --- run_onchange_apple-keyboard-swap.sh.tmpl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 run_onchange_apple-keyboard-swap.sh.tmpl diff --git a/run_onchange_apple-keyboard-swap.sh.tmpl b/run_onchange_apple-keyboard-swap.sh.tmpl new file mode 100755 index 0000000..43257f8 --- /dev/null +++ b/run_onchange_apple-keyboard-swap.sh.tmpl @@ -0,0 +1,16 @@ +#!/bin/bash +# Config hash: {{ "options hid-apple swap_fn_leftctrl=1" | sha256sum }} + +# Überprüfen, ob das System Linux mit aarch64 ist +if [[ "$(uname -s)" != "Linux" || "$(uname -m)" != "aarch64" ]]; then + echo "Dieses Skript ist nur auf Linux mit der Architektur aarch64 ausführbar." + exit 0 +fi + +echo "Ändere Apple Funktionstaste mit der Kontrolltaste!!!" + +# Temporäre Änderung +echo 1 | sudo tee /sys/module/hid_apple/parameters/swap_fn_leftctrl + +# Dauerhafte Konfiguration +echo 'options hid-apple swap_fn_leftctrl=1' | sudo tee /etc/modprobe.d/keyboard.conf >/dev/null