Home / Personal Devieces
For Arch with LUKS encrypted root, using the i3 window manager.
Note: The use of sudo
in the text below is a bit inconsistent, but you should know when you need it and when you don’t.
E
on the main entry, add nomodeset
at the end, and press enter to boot.ls /usr/share/kbd/keymaps/**/*.map.gz | less
no
for /usr/share/kbd/keymaps/i386/qwerty/no.map.gz
loadkeys <keymap>
(e.g. loadkeys no
)efivar --list
or ls /sys/firmware/efi/efivars
. If either exists, it’s in UEFI mode.ping
or curl
).timedatectl set-ntp true
timedatectl
.pacman -Sy && pacman -S archlinux-keyring
lsblk
dd if=/dev/zero of=/dev/<disk> bs=1M conv=fsync status=progress
/boot/efi/
.fdisk /dev/<disk>
g
n
+512M
for a 512MiB volume or nothing to fill it all.t
p
w
mkfs.fat -F32 /dev/<partition-1>
cryptsetup benchmark
cryptsetup luksFormat --type=luks1 --use-random -h sha256 -i 1000 -c aes-xts-plain64 -s 256 /dev/<partition-2>
(example parameters)cryptsetup luksOpen /dev/<partition> crypt_root
(for example name crypt_root
)mkfs.ext4 /dev/mapper/crypt_root
mount /dev/mapper/crypt_root /mnt
mkdir -p /mnt/boot/efi && mount /dev/<partition-1> /mnt/boot/efi
pacstrap /mnt <packages>
base linux linux-firmware intel-ucode amd-ucode archlinux-keyring polkit sudo bash-completion man-db man-pages xdg-utils xdg-user-dirs vim tar zip unzip curl
smartmontools lm_sensors hwloc zsh htop base-devel git jq rsync openssh tmux screen usbutils tcpdump nmap inetutils bind sipcalc
iwd
(or wpa_supplicant
)genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
ln -sf /usr/share/zoneinfo/<region>/<city> /etc/localtime
hwclock --systohc
vim /etc/locale.gen
en_US.UTF-8 UTF-8
.nb_NO.UTF-8 UTF-8
.locale-gen
/etc/locale.conf
, set LANG=<locale>
(e.g. LANG=en_US.UTF-8
)./etc/vconsole.conf
, set KEYMAP=<keymap>
(e.g. KEYMAP=no
).echo <hostname> > /etc/hostname
passwd
/etc/mkinitcpio.conf
, find the HOOKS=()
line. Add encrypt
after block
and keymap
after keyboard
(ordering matters).mkinitcpio -P
pacman -S grub efibootmgr
/etc/default/grub
, set GRUB_ENABLE_CRYPTODISK=y
.UUID
of the encrypted root physical partition: blkid
/dev/sda2
): In /etc/default/grub
, in the GRUB_CMDLINE_LINUX
variable, add cryptdevice=UUID=<device-UUID>:crypt_root root=/dev/mapper/crypt_root
.grub-install --target=x86_64-efi --efi-directory=/boot/efi
grub-mkconfig -o /boot/grub/grub.cfg
exit
reboot
E
on the main entry and add nomodeset
at the end of the linux
line. Press Ctrl+X
to continue. After proper display drivers are installed, this is no longer required.rmmod pcspkr
echo blacklist pcspkr > /etc/modprobe.d/nobeep.conf
systemctl enable fstrim.timer
swapon --show
fallocate -l <size> /swapfile
(e.g. 16G)chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
swapon --show
/etc/fstab
using this line: /swapfile swap swap defaults 0 0
mount -a
/etc/profile.d/editor.sh
export EDITOR=vim
export VISUAL=vim
systemctl enable systemd-networkd
systemctl disable systemd-networkd-wait-online.service
systemctl restart systemd-networkd
networkctl
should show the interface as anything but “unmanaged”.ip a
should show a routable IP address after a few seconds if using DHCP/RA.ip a
should show a wlp*
interface for the device.lspci -k
(for PCIe) or lsusb -v
(for USB) should show a loaded module.rfkill
(should show “unblocked”)netdev
group to allow users to control iwd/wpa_supplicant: groupadd -r netdev
pacman -S iwd
/etc/iwd/main.conf
.systemctl enable --now iwd.service
IgnoreCarrierLoss=5s
to the Network
section to allow for roaming without disconnects.iwctl
):
iwctl
has extenside tab-complete support.iwctl
: iwctl
device list
device <device> show
station <device> scan
station <device> get-networks
station <device> connect <SSID>
station <device> show
station <device> disconnect
known-networks list
known-networks <SSID> forget
iwd
.mkdir /var/lib/iwd/ && chown root:root /var/lib/iwd/ && chmod 700 /var/lib/iwd/
/var/lib/iwd/eduroam.8021x
(name-sensitive), containing the template snippet below with values found in the eduroam script.IWD_TLS_DEBUG=TRUE IWD_WSC_DEBUG_KEYS=1 /usr/lib/iwd/iwd
cat /tmp/iwd-tls-debug-server-cert.pem
iwctl station wlan0 connect <SSID>
sudo pacman -S wpa_supplicant
/etc/wpa_supplicant/wpa_supplicant.conf
.sudo chmod 600 /etc/wpa_supplicant/wpa_supplicant.conf
sudo mkdir -p /var/lib/wpa_supplicant/certs; sudo chmod 700 /var/lib/wpa_supplicant
update_config
allows it to update its config, which may change file permissions to something “readable by everyone”, according to the Arch wiki. If you don’t need this, set it to 0.country
to your country code.sudo wpa_supplicant -B -i <interface> -c /etc/wpa_supplicant/wpa_supplicant.conf -d
sudo wpa_cli
.sudo wpa_cli scan
sudo wpa_cli scan_results
sudo pkill wpa_supplicant
echo "nameserver 1.1.1.1" >> /etc/resolv.conf
(Cloudflare)echo "nameserver 2606:4700:4700::1111" >> /etc/resolv.conf
(Cloudflare)/etc/pacman.conf
, uncomment Color
./etc/pacman.conf
, uncomment the [multilib]
section.pacman -Syu
pacman -S nvidia nvidia-utils nvidia-settings
.
pacman -S cuda
pacman -S mesa xf86-video-amdgpu vulkan-radeon libva-mesa-driver
pacman -S mesa lib32-mesa vulkan-intel intel-media-driver
chmod 700 /boot
(umask 0077; mkdir -p /var/lib/keys/luks)
dd if=/dev/random of=/var/lib/keys/luks/crypt_root bs=2048 count=1 iflag=fullblock
cryptsetup luksAddKey /dev/<partition> /var/lib/keys/luks/crypt_root
/etc/mkinitcpio.conf
, set FILES=(/var/lib/keys/luks/crypt_root)
.mkinitcpio -P
/etc/default/grub
, in the GRUB_CMDLINE_LINUX
variable, add cryptkey=rootfs:/var/lib/keys/luks/crypt_root
.grub-mkconfig -o /boot/grub/grub.cfg
wheel
and sudo
groups are commonly used for giving sudo access, but I personally prefer sudo
since wheel
may also be used by polkit rules, su (pam_wheel
), etc.pacman -S sudo
groupadd -r sudo
EDITOR=vim visudo
%sudo ALL=(ALL:ALL) NOPASSWD: ALL
useradd -m -G sudo,adm,sys,uucp,proc,systemd-journal,video,netdev <user>
passwd <user>
sudo pacman -S --needed base-devel git
git clone https://aur.archlinux.org/yay.git
cd yay && makepkg -si
cd .. && rm -rf yay
yay -Y --gendb
yay -S mkinitcpio-numlock
numlock
to the HOOKS
list in /etc/mkinitcpio.conf
somewhere before encrypt
(assuming the system is encrypted) (e.g. before modconf
).sudo mkinitcpio -P
faillock --reset --user <user>
./etc/security/faillock.conf
, set deny = 5
./etc/systemd/resolved.conf
.DNS=1.1.1.1 2606:4700:4700::1111
.Domains=<domains>
.DNSSEC=no
.systemctl enable --now systemd-resolved
resolv.conf
: ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
resolvectl query vg.no
and curl google.com
sudo timedatectl set-ntp true
timedatectl
(see the “synchronized” field)sudo pacman -S iptables
sudo systemctl enable --now iptables.service ip6tables.service
sudo curl https://raw.githubusercontent.com/HON95/scripts/master/iptables/iptables.sh -o /etc/iptables/config.sh
sudo chmod +x /etc/iptables/config.sh
sudo /etc/iptables/config.sh
sudo pacman -S most
.bashrc
and/or .zshrc
, set export PAGER=most
/etc/bash_completion.d
./etc/profile.d/completion.sh
, see the example below.sudo pacman -S xorg-server xorg-xinit xorg-xrandr xorg-xinput
Note: Install either the LightDM (X11 GUI) or Ly (TTY TUI) display manager, not both. Ly is more minimalistic but doesn’t work well with multiple monitors where you may want to specify the layout in Xorg.
~/.xprofile
.sudo pacman -S lightdm
systemctl enable lightdm
/etc/lightdm/lightdm-gtk-greeter.conf
or using the lightdm-gtk-greeter-settings
GUI.sudo pacman -S lightdm-gtk-greeter
/etc/lightdm/lightdm.conf
, under the [Seat:*]
section, set greeter-session=lightdm-gtk-greeter
./etc/lightdm/lightdm-gtk-greeter.conf
, under the [greeter]
section, set background=<image-path>
. The /usr/share/pixmaps
dir is recommended for storing backgrounds.sudo pacman -S numlockx
/etc/lightdm/lightdm.conf
, under the [Seat:*]
section, set greeter-setup-script=/usr/bin/numlockx on
./etc/ly/config.ini
.yay -S ly
sudo systemctl enable ly
animate = true
and hide_borders = true
.sudo pacman -S numlockx
/etc/X11/xinit/xinitrc.d/90-numlock.sh
, containing #!/bin/sh
and numlockx &
. Make it executable.Mod+Shift+R
to reload the i3 config.Mod+Shift+E
to exit i3.Mod+Enter
to open a terminal.exec_always
config statements will be run again during reload but exec
statements will only run when starting i3.sudo pacman -S noto-fonts noto-fonts-emoji
sudo pacman -S i3-wm
sudo localectl set-x11-keymap <keymap>
(e.g. no
)sudo pacman -S alacritty firefox
pipewire-jack
and wireplumber
.Ctrl+Alt+F1
if you need to enter a terminal TTY (TTY1). Ly/LightDM uses one of the first TTYs, the rest are terminal TTYs.Win
as default modifier.Mod+Enter
to open a terminal.xrandr
xrandr --output eDP --auto
xrandr --output HDMI-A-0 --right-of eDP --rotate left --auto
xrandr --output DP-1 --set "Broadcast RGB" "Full"
xrandr --output DP-1 --set "output_csc" "bypass"
$HOME/.config/xrandr.sh
containing the configure commands for all displays. Call it from the i3 config.sudo pacman -S libinput
/etc/X11/xorg.conf.d/70-synaptics.conf
, add the config snippet from below. TODOxinput --list
xinput --map-to-output 'x' eDP
(for touchscreen x
)xorg-xbacklight
package, which didn’t work for me neither on AMD nor Intel laptops./sys/class/backlight
./sys/class/backlight/<x>/max_brightnes
.echo 10 | sudo tee /sys/class/backlight/<x>/brightness
video
group:
/etc/udev/rules.d/backlight.rules
, add the following (template, using <x>
from above):
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="<x>", RUN+="/bin/chgrp video /sys/class/backlight/<x>/brightness"
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="<x>", RUN+="/bin/chmod g+w /sys/class/backlight/<x>/brightness"
/usr/local/bin/display-backlight
script to control the backlight. Example script. bindsym XF86MonBrightnessUp exec --no-startup-id /usr/local/bin/display-backlight +1
bindsym XF86MonBrightnessDown exec --no-startup-id /usr/local/bin/display-backlight -1
sudo mkdir -p /usr/share/fonts/TTF
for x in Regular Bold Italic Bold\ Italic; do sudo curl -sSfL "https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20${x/ /%20}.ttf" -o "/usr/share/fonts/TTF/$x.ttf"; done
bar
section of the i3 config.yay -S polybar
mkdir ~/.config/polybar && cp /usr/share/doc/polybar/examples/config.ini ~/.config/polybar/config
font-<n>
statements. Set font0 = <family>:style=<s>:size=<n>;<vertical-offset>
(e.g. font-0 = "MesloLGS NF:style=Regular:size=9;2"
). Use fc-list | grep <font-name>
(the part after the first colon) to search for fonts. Make sure to use a Unicode-compatible font (which the default may not be.bottom = true
to move it to the bottom.radius
to disable rounded corners.border-size
to disable the padding/border around the bar.%local_ip6%
for the IPv6 address (one of them). Maybe clone the module to have one for IPv4 and one for IPv6.modules-{left,center,right}
variables.exec_always --no-startup-id $HOME/.config/polybar/launch.sh
.sudo pacman -S alacritty
mkdir ~/.config/alacritty/
curl https://raw.githubusercontent.com/dracula/alacritty/master/dracula.yml -o ~/.config/alacritty/dracula.yml
~/.config/alacritty/alacritty.yml
, see the example config below.bindsym $mod+Return ...
line with bindsym $mod+Return exec alacritty
Ctrl+Shift+Space
to enter vi mode, allowing you to e.g. move around (and scroll up) using arrow keys and select text using V
or Shift+V
. Press Ctrl+Shift+Space
again to exit.sudo pacman -S rofi
sudo pacman -S rofimoji xdotool
rofi-theme-selector
(e.g. glue_pro_blue
)~/.config/rofi/config.rasi
, see the example below.~/.config/rofimoji.rc
and set action = copy
(copy to clipboard by default).bindsym $mod+d
line.bindsym $mod+d exec rofi -show drun
.bindsym $mod+shift+d exec rofi -show window
.bindsym $mod+mod1+d exec rofi -modi "emoji:rofimoji" -show emoji
.sudo pacman -S feh
exec_always --no-startup-id feh --bg-scale $HOME/Pictures/background.png
(example).focus_follows_mouse no
.sudo pacman -S i3-gaps
(then replace i3-wm with i3-gaps)for_window [class=".*"] border pixel 4
to only show the border and no title bar, or 0
to remove the border too.gaps inner 8
.sudo pacman -S xsel
netdev
group to allow controling iwd.yay -S iwgtk snixembed-git
exec --no-startup-id snixembed
rm /etc/xdg/autostart/iwgtk-indicator.desktop
exec --no-startup-id iwgtk -i
iwgtk
(GUI) or iwgtk -i
(tray icon)
dunst
server and the libnotify
support library: sudo pacman -S dunst libnotify
/etc/dunst/dunstrc
.mkdir -p ~/.config/dunst && vim ~/.config/dunst/dunstrc
global
section, set e.g. scale = 2
.global
section, set e.g. font = MesloLGS NF 8
(or 12 for high-res).systemctl --user restart dunst
notify-send 'Hello world!' 'This is an example notification.' --icon=dialog-information
i3lock-color
screen locker: yay -S i3lock-color
xss-lock
automatic locker: sudo pacman -S xss-lock
set $i3lock i3lock --nofork --ignore-empty-password --pass-media-keys
, to avoid repetition.--image Pictures/background.png
.bindsym $mod+l exec --no-startup-id $i3lock
. This may conflict with some focus
keybinds you probably don’t need, so just remove those (i3 will tell you about it if you don’t remove them).xss-lock
line and replace it with exec --no-startup-id xss-lock --transfer-sleep-lock -- $i3lock
. (Test with loginctl lock-session
after restarting or relogging.)<name>.desktop
files. These applications may be autostarted using a tool like dex
, following the XDG Autostart spec..desktop
entry file for it in /etc/xdg/autostart
(system) ~/.config/autostart
(user). A simple method is to find the entry in e.g. /usr/share/applications/
(system) or ~/.local/share/applications/
(user), then symlink it into the appropriate autostart directory (e.g. ln -s /usr/share/applications/discord.desktop ~/.config/autostart
).sudo pacman -S dex
exec --no-startup-id dex --autostart --environment i3
dex --autostart --environment i3 &>/dev/null
Note: We’re using the PipeWire sound server, a modern, security-focused and compatible replacement for both PulseAudio and JACK. See PipeWire (Applications) for more config info.
sudo pacman -S alsa-utils alsa-firmware
sudo pacman -S pipewire pipewire-alsa pipewire-pulse pipewire-jack pipewire-v4l2 pipewire-x11-bell wireplumber pavucontrol
systemctl --user start pipewire-pulse
pavucontrol
to configure volumes, inputs, outputs and stuff.sudo pacman -S helvum
aur/spotify
, official) to test with.sudo pacman -S playerctl
pamixer
(like ALSA’s amixer
but for PulseAudio): sudo pacman -S pamixer
bindsym XF86AudioRaiseVolume
and similar lines.yay -S polybar-spotify-git
~/.config/polybar/config
), add a module spotify
(see config snipper below) and add it to some bar module section.rfkill
or some hardware switch isn’t disabling/blocking the adapter.sudo pacman -S bluez bluez-utils
sudo systemctl enable --now bluetooth.service
lp
group./etc/bluetooth/main.conf
, in the Policy
section, set AutoEnable = true
.pipewire-pulse
), which should already have been set up and includes support for Bluetooth.sudo pacman -S blueman
bluetoothctl
:
bluetoothctl -- <cmd>
.bluetoothctl
list
select <mac>
power on
scan on
devices
agent on
default-agent
pair <mac>
trust <mac>
connect <mac>
Ctrl+D
sudo pacman -S vlc
yay -S mirage
sudo pacman -S gimp
sudo pacman -S thunar
sudo pacman -S ranger
sudo pacman -S code
yay -S visual-studio-code-bin
sudo pacman -S libreoffice-fresh
sudo pacman -S okular
sudo pacman -S maim
sudo pacman -S flameshot
fireshot gui
yay -S p7zip-gui
.7z
file format, it doesn’t preserve owner info.sudo pacman -S nmap tcpdump wireshark-qt
xdg-settings set default-web-browser firefox.desktop
File: /etc/systemd/network/en.network
(example)
This example sets up any interface starting with en
(i.e. wired Ethernet interfaces) to use DHCPv4 and SLAAC/DHCPv6. The DHCP
and IPv6AcceptRA
sections are optional, the default values are typically fine. Use RouteMetric=2048
for WLAN interfaces to prefer LAN when both are connected. For WLAN interfaces, add IgnoreCarrierLoss=5s
to the Network
section to prevent it from going down during short connection issues. Add LLDP=yes
to capture LLDP info (but not emit it), if you’re into that. Use Anonymize
for DHCPv4 to hide client info and emulate a Windows client (DHCPv6 doesn’t send any too revealing info).
[Match]
Name=en*
[Network]
DHCP=yes
IPv6AcceptRA=yes
IPv6PrivacyExtensions=yes
#LLDP=yes
[DHCPv4]
RouteMetric=1024
UseDNS=yes
UseNTP=no
UseHostname=no
UseDomains=yes
Anonymize=yes
[DHCPv6]
RouteMetric=1024
UseDNS=yes
UseNTP=no
UseHostname=no
UseDomains=yes
[IPv6AcceptRA]
RouteMetric=1024
UseDNS=yes
UseDomains=yes
File: /etc/iwd/main.conf
[General]
AddressRandomization=network
[Settings]
AutoConnect=true
[Scan]
DisablePeriodicScan=no
File: /var/lib/iwd/eduroam.8021x
(for SSID eduroam
)
The following values from the eduroam configuration assistant tool (CAT) are required (from Arch iwd wiki page):
iwd | eduroam | Comment |
---|---|---|
File name | Config.ssids (one) |
Typically eduroam , with 8021x file ending. |
EAP-Method |
Config.eap_outer |
|
EAP-Identity |
Config.anonymous_identity |
@Config.user_realm if missing. |
EAP-PEAP-CACert |
Config.CA |
Place the cert data in a file and specify the path. |
EAP-PEAP-ServerDomainMask |
Config.servers (one) |
Without DNS: prefix. |
EAP-PEAP-Phase2-Method |
Config.eap_inner |
|
EAP-PEAP-Phase2-Identity |
<username> |
|
EAP-PEAP-Phase2-Password |
<password> |
Place the CA certificate in /var/lib/iwd/eduroam.crt
.
NTNU eduroam template:
[Security]
EAP-Method=PEAP
EAP-Identity=@ntnu.no
EAP-PEAP-CACert=/var/lib/iwd/eduroam.crt
EAP-PEAP-ServerDomainMask=DNS:radius.ntnu.no
EAP-PEAP-Phase2-Method=MSCHAPV2
EAP-PEAP-Phase2-Identity=<username>@ntnu.no
EAP-PEAP-Phase2-Password=<password>
[Settings]
AutoConnect=true
File: /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/run/wpa_supplicant
ctrl_interface_group=netdev
# Allow wpa_cli to add networks and change the config?
# File permissions may get fucked.
update_config=0
country=NO
# More agressive scanning for roaming
bgscan="simple:30:-70:3600"
# Example networks below, omit these
# WPA Personal
# Use "wpa_passphrase <ssid>" to generate a network stub with a PSK-hashed password to avoid cleartext.
network={
ssid="Example"
psk="HelloWorld"
}
# WPA Enterprise (PEAP-MSCHAPv2) (NTNU eduroam example)
network={
key_mgmt=WPA-EAP
pairwise=CCMP
group=CCMP TKIP
eap=PEAP
phase2="auth=MSCHAPV2"
# Point to actual EAP CA cert
ca_cert="/var/lib/wpa_supplicant/certs/eduroam.crt"
altsubject_match="DNS:radius.ntnu.no"
anonymous_identity="@ntnu.no"
# Your credentials
identity="[email protected]"
password="user_password"
}
# dot1x wired (PEAP-MSCHAPv2)
# NOT TESTED
network={
key_mgmt=IEEE8021X
eap=PEAP
identity="user_name"
password="user_password"
phase2="autheap=MSCHAPV2"
}
File: ~/.config/polybar/launch.sh
#!/bin/bash
killall -q polybar
#polybar main &>>/tmp/polybar.log &
polybar main >/dev/null 2>&1 &
File: ~/.config/polybar/config
[module/spotify]
type = custom/script
interval = 1
format = <label>
#exec = python /usr/share/polybar/scripts/spotify_status.py -f '[{artist}] {song}' -t 50 -q
exec = python /usr/share/polybar/scripts/spotify_status.py -f '{song}' -t 25 -q
format-underline = #1db954
File: ~/.config/alacritty/alacritty.yml
font:
# normal:
# family: MesloLGS NF
# style: Regular
size: 9
env:
TERM: xterm-256color
import:
# Theme
- ~/.config/alacritty/dracula.yml
file: ~/.config/rofi/config.rasi
configuration {
font: "MesloLGS NF 10";
}
@theme "glue_pro_blue"
File: /etc/X11/xorg.conf.d/10-monitor.conf
Section "Monitor"
Identifier "DP-4"
Option "Primary" "true"
EndSection
Section "Monitor"
Identifier "DVI-I-1"
Option "RightOf" "DP-4"
Option "Rotate" "left"
EndSection
File: /etc/X11/xorg.conf.d/20-dpms.conf
Section "ServerFlags"
# In minutes, 0 to disable
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "30"
Option "BlankTime" "0"
EndSection
Alternatively, to disable DPMS completely:
Section "Extensions"
Option "DPMS" "Disable"
EndSection
File: /etc/profile.d/completion.sh
# Don't include /usr/share/bash-completion/bash_completion,
# assume bashrc or something already includes it.
# We don't want that when reading /etc/profile with ZSH anyways.
if [[ $PS1 && -d /etc/bash_completion.d/ ]]; then
for f in /etc/bash_completion.d/*; do
test -r "$f" && . "$f"
done
unset f
fi
File: ~/.config/i3/config
Requires playerctl
.
# Media keys
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
bindsym XF86AudioPause exec --no-startup-id playerctl play-pause
bindsym XF86AudioStop exec --no-startup-id playerctl stop
bindsym XF86AudioPrev exec --no-startup-id playerctl previous
bindsym XF86AudioNext exec --no-startup-id playerctl next
File: ~/.config/i3/config
Requires pamixer
.
# Volume keys
bindsym XF86AudioRaiseVolume exec --no-startup-id pamixer -i 5
bindsym XF86AudioLowerVolume exec --no-startup-id pamixer -d 5
bindsym XF86AudioMute exec --no-startup-id pamixer -t
bindsym XF86AudioMicMute exec --no-startup-id pamixer --default-source -t
File: ~/.config/i3/config
Requires maim
.
# Capture screen (active window and full)
bindsym $mod+Print exec maim -i $(xdotool getactivewindow) $HOME/Downloads/Screenshot_$(date -Iseconds).png
bindsym $mod+Shift+Print exec maim $HOME/Downloads/Screenshot_$(date -Iseconds).png
lsblk
cryptsetup luksOpen /dev/<partition> crypt_root
mount /dev/mapper/crypt_root /mnt
mount /dev/<partition-1> /mnt/boot/efi
arch-chroot /mnt
grub-install --target=x86_64-efi --efi-directory=/boot/efi && grub-mkconfig -o /boot/grub/grub.cfg
mkinitcpio -P
If the GRUB or initramfs commands didn’t work (e.g. if it broke during an Pacman upgrade and lots of packages are corrupt):
mount -t proc /proc /mnt/proc
mount --rbind /sys /mnt/sys
mount --rbind /dev /mnt/dev
rm /mnt/etc/resolv.conf; echo nameserver 1.1.1.1 > /mnt/etc/resolv.conf
rm /mnt/var/lib/pacman/db.lck
cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist
pacman --sysroot /mnt -Qq >tmp.txt
pacman --sysroot /mnt -S --overwrite "*" - <tmp.txt
chmod 700 /mnt/boot
ln -sf /run/systemd/resolve/stub-resolv.conf /mnt/etc/resolv.conf
yay -Qqm | yay -S -