MacBook Air で Ubuntuベースのディストリビューションを使う場合を想定しています
# NOPASSWD
echo $USER ALL=NOPASSWD: ALL | sudo tee /etc/sudoers.d/$USER
# hardware keyboard [Apple Aluminium (JIS)]
sudo dpkg-reconfigure keyboard-configuration
# toggle fn key
sudo tee /etc/modprobe.d/hid_apple.conf <<'...'
options hid_apple fnmode=2
...
sudo update-initramfs -u -k all
# disable auto update
sudo dpkg-reconfigure -p low unattended-upgrades
# change directory name in English
LANG=C xdg-user-dirs-gtk-update
# libinput-gestures
mkdir ~/.config || true
tee ~/.config/libinput-gestures.conf <<'...'
gesture swipe left 3 xdotool key alt+Left
gesture swipe right 3 xdotool key alt+Right
...
libinput-gestures-setup restart