dotfiles/run_onchange_apple-keyboard-swap.sh.tmpl
2025-04-29 20:14:49 +02:00

14 lines
528 B
Bash
Executable file

#!/bin/bash
{{- if and (eq .chezmoi.os "linux") (eq .chezmoi.arch "arm64") }}
echo "Ändere Apple Funktionstaste mit der Kontrolltaste!!!"
echo "Ändere Apple Commandtaste mit der Altasten!!!"
# Temporäre Ändderung
echo 1 | sudo tee /sys/module/hid_apple/parameters/swap_opt_cmd
echo 1 | sudo tee /sys/module/hid_apple/parameters/swap_fn_leftctrl
# Dauerhafte Konfiguration
echo -e "options hid_apple swap_opt_cmd=1\noptions hid_apple swap_fn_leftctrl=1" | sudo tee /etc/modprobe.d/hid_apple.conf
sudo dracut -f
{{- end }}