dotfiles/run_onchange_apple-keyboard-swap.sh.tmpl
2025-04-22 08:29:57 +02:00

17 lines
605 B
Cheetah
Executable file

{{- if and (eq .chezmoi.os "linux") (eq .chezmoi.arch "arm64") }}
#!/bin/bash
echo "Ändere Apple Funktionstaste mit der Kontrolltaste!!!"
echo "Ändere Apple Commandtaste mit der Altasten!!!"
# Temporäre Änderung
# Command (⌘) und Alt (⌥) tauschen
echo 1 | sudo tee /sys/module/hid_apple/parameters/swap_opt_cmd
# Fn und linke Control-Taste tauschen
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 }}