Operazioni preliminari
Windows 11
- Disabilitare Fasst Boot.
- Verificare che non sia abilitato BitLocker Drive Encryption.
- Shrink Volume C:, lasciamo 100 GB a Linux.
- Disabilitare Secure Boot nel BIOS.
Creazione chiavetta USB
Scarico il file iso di Arch nella edizione del 01/07/2026 e copio l’immagine sulla chiavetta USB (smontata dal filesystem):
sudo dd bs=4M if=/path/to/image.iso of=/dev/sdX status=progress oflag=syncInstallazione sistema base
Boot da USB
- Premo Enter (è scritto sotto il logo di Lenovo).
- Premo F12 per effettuare la selezionare il device di boot.
- Seleziono la porta USB con la chiavetta inserta.
Imposta terminale
loadkeys it
setfont ter-132bImposta internet
iwctl
[iwd]# device list
[iwd]# station wlan0 scan
[iwd]# station wlan0 get-networks
[iwd]# station wlan0 connect SSID
[iwd]# exit
ping -c 4 8.8.8.8Partizione disco
fdisk -l
cfdisk /dev/nvme0n1Creare le seguenti parizioni (nvme0n1p1 è la partizione EFI già presente):
- Swap tipo Linux swap di 4GB (es. nvme0n1p5).
- Root tipo Linux x86-64 root per il rimanente spazio (es. nvme0n1p6).
mkfs.ext4 /dev/nvme0n1p6
mkswap /dev/nvme0n1p5Montaggio partizioni
mount /dev/nvme0n1p6 /mnt
mkdir /mnt/boot
mount /dev/nvme0n1p1 /mnt/boot
swapon /dev/nvme0n1p5Installazione
pacstrap -K /mnt base linux linux-firmware neovim networkmanager intel-ucode
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
pacman -Syu
pacman -S wirelwss_tools wpa_supplicant iwd dialog network-manager-applet
pacman -S sudo vim base-develConfigurazione
ln -sf /usr/share/zoneinfo/Europe/Rome /etc/localtime
hwclock --systohc
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
echo "KEYMAP=it" > /etc/vconsole.conf
echo "X390" > /etc/hostname
echo "127.0.1.1 X390.localdomain X390" >> /etc/hosts
systemctl enable NetworkManager
passwd
mkinitcpio -P
useradd -m -G wheel,video,audio -s /bin/bash max
passwd max
visudo
pacman -S grub efibootmgr os-prober
echo "GRUB_DISABLE_OS_PROBER=false" >> /etc/default/grub
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
exit
umount -R /mnt
rebootReboot
Finalizzare installazione
Entro come utente max.
nmcli device wifi connect "WIFI_NAME" password "WIFI_PASSWORD"
sudo pacman -S mesa xorg-xwayland terminus-font
sudo pacman -S sway swaybg swaylock swayidle waybar alacritty wofi libnotify
sudo pacman -S mako polkit-gnome grim slurp wl-clipboard brightnessctl
sudo pacman -S ttf-firacode-nerd ttf-mononoki-nerd ttf-jetbrains-mono-nerd
sudo pacman -S archlinux-wallpaper
sudo pacman -S btop git stow ruby lsd bat nfs-utils ripgrep fzf fd
sudo pacman -S ripgrep fzf fd pacman-contrib chromium less
sudo pacman -S lua-language-server marksman
sudo pacman -S vscode-css-languageserver vscode-html-languageserver
sudo pacman -S vscode-json-languageserver
sudo pacman -S zsh-completions zsh-autosuggestions
sudo pacman -S zsh-syntax-highlighting zsh-history-substring
sudo pacman -S pipewire pipewire-alsa pipewire-pulse alsa-utils
sudo pacman -S wireplumber sof-firmware pavucontrol
systemctl --user --now enable pipewire wireplumber pipewire-pulseSet bigget font TTY/GRUB
TTY
sudo pacman -S terminus-font
sudo echo "FONT=ter-132n" >> /etc/vconsole.confGRUB
sudo grub-mkfont -s 28 -o /boot/grub/fonts/biggerfont.pf2 /usr/share/fonts/TTF/FiraCodeNerdFontMono-Regular.ttfAggiungo il seguente codice alla fine del file /etc/default/grub.
# Bigger font
GRUB_FONT="/boot/grub/fonts/biggerfont.pf2"dotfiles
ssh-keygenCopiare il contenuto della chiave all’interno del file:
/var/git/.ssh/authorized_keys
Nel VPS max73.it per permettere di clonare il repo dei dotfiles.
mkdir dotfiles
cd dotfiles
git clone git@max73.it:dots-x390.git .Yay
sudo pacman -Syu
sudo pacman -S --needed base-devel git
mkdir TEMP
cd TEMP
git clone https://aur.archlinux.org/yay-bin.git
cd yay-bin
makepkg -si
yay --versionSway system
cd ~/dotfiles
stow swaysystem
swaymsg exitConfigurazioni per:
- Sway
- Swaynag (utility per creare il PowerOff Menu)
- Waybar
- Wofi
- Mako
- Script utilities
Rotation
sudo pacman -S iio-sensor-proxy
sudo systemctl enable --now iio-sensor-proxy.serverCreato script sway-rotate.sh:
#!/bin/sh
# Target your specific internal display. Run 'swaymsg -t get_outputs' to verify name.
OUTPUT="eDP-1"
# Monitor the accelerometer and loop through orientation updates
monitor-sensor | while read -r line; do
# Extract the orientation state string
ORIENTATION=$(echo "$line" | grep -oE 'orientation changed: [a-z-]+' | cut -d' ' -f3)
case "$ORIENTATION" in
normal)
swaymsg output "$OUTPUT" transform 0
;;
bottom-up)
swaymsg output "$OUTPUT" transform 180
;;
left-up)
swaymsg output "$OUTPUT" transform 270
;;
right-up)
swaymsg output "$OUTPUT" transform 90
;;
esac
# Map all touch and stylus inputs to match the active output transformation
if [ ! -z "$ORIENTATION" ]; then
swaymsg input "type:touch" map_to_output "$OUTPUT"
swaymsg input "type:tablet_tool" map_to_output "$OUTPUT"
fi
doneInserito la seguente riga nel file di configurazione di Sway:
# exec rot8
exec_always ~/bin/sway-rotate.shKeyboard in Tablet
yay -S wvkbdCreato script toggle-kbd.sh:
#!/bin/bash
# Check if wvkbd is already running
if pgrep -x "wvkbd-mobintl" > /dev/null; then
# If running, kill it to hide it
killall wvkbd-mobintl
else
# If not running, start it in the background
# -L 250 sets the keyboard height to 250 pixels (adjust as preferred)
wvkbd-mobintl -L 250 &
fiInserito le seguenti righe nel file di configurazione di Sway:
# Toggle on-screen keyboard
bindsym $mod+Escape exec ~/bin/toggle-kbd.sh
# Ensure the virtual keyboard does not grab focus from text inputs
for_window [app_id="wvkbd"] focus_mode_never
# Prevent Sway from attempting to tile the keyboard layer
for_window [app_id="wvkbd"] floating enableSpecial Keys
Aggiunge le seguenti righe al file di configurazione di Sway:
# Desktop Volume Controls via Scripts
bindsym XF86AudioRaiseVolume exec ~/bin/volume_control.sh up
bindsym XF86AudioLowerVolume exec ~/bin/volume_control.sh down
bindsym XF86AudioMute exec ~/bin/volume_control.sh mute
bindsym XF86AudioMicMute exec wpctl set-source-mute @DEFAULT_AUDIO_SOURCE@ toggle
# Screen Brightness Controls via Scripts
bindsym XF86MonBrightnessUp exec ~/bin/brightness_control.sh up
bindsym XF86MonBrightnessDown exec ~/bin/brightness_control.sh downZsh
cd ~/dotfiles
stow zsh
chsh -s $(which zsh)
reboot