Home / Personal Devieces
Components:
E on the main entry, add nomodeset at the end, and press enter to boot.ls /usr/share/kbd/keymaps/**/*.map.gz | lessno for /usr/share/kbd/keymaps/i386/qwerty/no.map.gzloadkeys <keymap> (e.g. loadkeys no)efivar --list or ls /sys/firmware/efi/efivars. If either exists, it’s in UEFI mode.wpa_passphrase "<SSID>" "<PSK>" > /etc/wpa_supplicant/wpa_supplicant.confwpa_supplicant -B -c /etc/wpa_supplicant/wpa_supplicant.conf -i wlan0ip a and try a ping -4 google.com (and -6).timedatectl set-ntp truetimedatectl.pacman -Sy && pacman -S archlinux-keyringlsblkdd if=/dev/zero of=/dev/<disk> bs=1M conv=fsync status=progress/boot/efi/.fdisk /dev/<disk>
gn
+512M for a 512MiB volume or nothing to fill it all.t
pwmkfs.fat -F32 /dev/<partition-1>cryptsetup benchmarkcryptsetup 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_rootmount /dev/mapper/crypt_root /mntmkdir -p /mnt/boot/efi && mount /dev/<partition-1> /mnt/boot/efipacstrap /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 whoissmartmontools lm_sensors hwloc zsh htop base-devel git jq rsync openssh tmux screen usbutils tcpdump nmap inetutils bindiwd (or wpa_supplicant)genfstab -U /mnt >> /mnt/etc/fstabarch-chroot /mntln -sf /usr/share/zoneinfo/<region>/<city> /etc/localtimehwclock --systohcvim /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/hostnamepasswd/etc/mkinitcpio.conf, find the HOOKS=() line. Add encrypt after block and keymap after keyboard (ordering matters).mkinitcpio -Ppacman -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/efigrub-mkconfig -o /boot/grub/grub.cfgexitrebootE 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 pcspkrecho blacklist pcspkr > /etc/modprobe.d/nobeep.confsystemctl enable fstrim.timerswapon --showfallocate -l <size> /swapfile (e.g. 16G)chmod 600 /swapfilemkswap /swapfileswapon /swapfile
swapon --show/etc/fstab using this line: /swapfile swap swap defaults 0 0
mount -a/etc/profile.d/editor.shexport EDITOR=vimexport VISUAL=vimsystemctl enable systemd-networkdsystemctl disable systemd-networkd-wait-online.servicesystemctl restart systemd-networkdnetworkctl 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”)pacman -S iwd/etc/iwd/main.conf.sudo usermod -aG network <user>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: iwctldevice listdevice <device> showstation <device> scanstation <device> get-networksstation <device> connect <SSID>station <device> showstation <device> disconnectknown-networks listknown-networks <SSID> forgetiwd.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/iwdcat /tmp/iwd-tls-debug-server-cert.pemiwctl station wlan0 connect <SSID>sudo pacman -S wpa_supplicant/etc/wpa_supplicant/wpa_supplicant.conf.sudo chmod 600 /etc/wpa_supplicant/wpa_supplicant.confsudo mkdir -p /var/lib/wpa_supplicant/certs; sudo chmod 700 /var/lib/wpa_supplicantupdate_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 -dsudo wpa_cli.sudo wpa_cli scansudo wpa_cli scan_resultssudo pkill wpa_supplicantecho "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 -Syupacman -S nvidia nvidia-utils nvidia-settings.
pacman -S cudapacman -S mesa xf86-video-amdgpu vulkan-radeon libva-mesa-driverpacman -S mesa lib32-mesa vulkan-intel intel-media-driverchmod 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=fullblockcryptsetup 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.cfgwheel 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 sudogroupadd -r sudoEDITOR=vim visudo%sudo ALL=(ALL:ALL) NOPASSWD: ALLuseradd -m -G sudo,adm,sys,uucp,proc,systemd-journal,video,network <user> (remove any missing groups)passwd <user>sudo pacman -S --needed base-devel gitgit clone https://aur.archlinux.org/yay.gitcd yay && makepkg -sicd .. && rm -rf yayyay -Y --gendbyay -S mkinitcpio-numlocknumlock to the HOOKS list in /etc/mkinitcpio.conf somewhere before encrypt (assuming the system is encrypted) (e.g. before modconf).sudo mkinitcpio -Pfaillock --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.sudo systemctl enable --now systemd-resolvedresolv.conf: sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.confresolvectl query vg.no and curl google.comsudo timedatectl set-ntp truetimedatectl (see the “synchronized” field)sudo pacman -S iptablessudo systemctl enable --now iptables.service ip6tables.servicesudo curl https://raw.githubusercontent.com/HON95/scripts/master/iptables/iptables.sh -o /etc/iptables/config.shsudo chmod +x /etc/iptables/config.shsudo /etc/iptables/config.shyay -S lysudo systemctl enable ly/etc/ly/config.ini, set animation = CMatrix.sudo pacman -S noto-fonts noto-fonts-emojiIf not using Hyprland (Wayland).
sudo pacman -S xorg-server xorg-xinit xorg-xrandr xorg-xinputMod+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 execstatements will only run when starting i3.sudo pacman -S i3-wmsudo 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.sudo pacman -S numlockx/etc/X11/xinit/xinitrc.d/90-numlock.sh, containing #!/bin/sh and numlockx &. Make it executable.xrandrxrandr --output eDP --autoxrandr --output HDMI-A-0 --right-of eDP --rotate left --autoxrandr --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 --listxinput --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>/brightnessvideo 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
bar section of the i3 config.yay -S polybarmkdir ~/.config/polybar && cp /usr/share/doc/polybar/examples/config.ini ~/.config/polybar/configfont-<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 rofisudo pacman -S rofimoji xdotoolrofi-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.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 xseli3lock-color screen locker: yay -S i3lock-colorxss-lock automatic locker: sudo pacman -S xss-lockset $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.)sudo pacman -S fehexec_always --no-startup-id feh --bg-scale $HOME/Pictures/background.png (example).If not using i3 (X11).
sudo pacman -S hyprland kitty brightnessctl xdg-desktop-portal-hyprland xdg-desktop-portal-gtk hyprpolkitagent qt5-wayland qt6-waylandsystemctl --user enable hyprpolkitagentSuper+Qvim ~/.config/hypr/hyprland.confinput { kb_layout = no } (Norway)input { repeat_rate = 50 // repeat_delay = 500 }monitor = eDP-1,1920x1080@60,0x0,1 (example for 1080p60, position 0x0, scaling 1x)
hyprctl monitorsmonitor = ,preferred,auto,autohyprland.conf, put xwayland { force_zero_scaling = true }.~/.config/{electron,code}-flags.conf and add --ozone-platform=wayland.sudo pacman -S rofi rofimoji xdotoolrofi-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).bind = SUPER, D, exec, rofi -show drun.bind = SUPER SHIFT, D, exec, rofi -show window.bind = SUPER ALT, D, exec, rofi -modi "emoji:rofimoji" -show emoji.sudo pacman -S waybarmkdir ~/.config/waybar/ ; cp /etc/xdg/waybar/* ~/.config/waybar/sway/workspaces with hyprland/workspaces.#workspaces button.focused with #workspaces button.active in ~/.config/waybar/style.css.exec-once = waybar to the Hyprland-config.sudo pacman -S hyprlockcurl https://raw.githubusercontent.com/hyprwm/hyprlock/refs/heads/main/assets/example.conf -o ~/.config/hypr/hyprlock.confbind = SUPER, L, exec, hyprlockbindl = , switch:on:Lid Switch, exec, hyprlock --immediatesudo pacman -S hypridle~/.config/hypr/hypridle.conf, see the example below.exec-once = hypridle to the Hyprland config.misc { disable_splash_rendering = true \n disable_hyprland_logo = true } to the Hyprland config.sudo pacman -S hyprpapercp yolo.jpg ~/Pictures/desktop.jpg~/.config/hypr/hyprpaper.conf, see the example below.exec-once = hyprpaper to the Hyprland config.sudo pacman -S hyprpickerbind = SUPER SHIFT, C, exec, hyprpicker -ra to the Hyprland config.sudo mkdir -p /usr/share/fonts/TTFfor 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"; donesudo pacman -S alacrittymkdir ~/.config/alacritty/curl https://raw.githubusercontent.com/dracula/alacritty/master/dracula.toml -o ~/.config/alacritty/dracula.toml~/.config/alacritty/alacritty.toml, see the example config here.bindsym $mod+Return ... line with bindsym $mod+Return exec alacrittyCtrl+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.network group to allow controling iwd.yay -S iwgtk snixembed-gitexec --no-startup-id snixembedrm /etc/xdg/autostart/iwgtk-indicator.desktopexec --no-startup-id iwgtk -iiwgtk (GUI) or iwgtk -i (tray icon)
sudo pacman -S dunst libnotify/etc/dunst/dunstrc.mkdir -p ~/.config/dunst && vim ~/.config/dunst/dunstrcsystemctl --user restart dunstnotify-send 'Hello world!' 'This is an example notification.' --icon=dialog-information<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) or ~/.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 dexexec --no-startup-id dex --autostart --environment i3dex --autostart --environment i3 &>/dev/nullNote: 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-firmware alsa-utils sof-firmware pipewire pipewire-alsa pipewire-pulse pipewire-jack pipewire-v4l2 pipewire-x11-bell wireplumber pavucontrolsystemctl --user start pipewire-pulsepavucontrol to configure volumes, inputs, outputs and stuff.sudo pacman -S helvumaur/spotify, official) to test with.sudo pacman -S playerctlpamixer (like ALSA’s amixer but for PulseAudio): sudo pacman -S pamixerbindsym 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-utilssudo systemctl enable --now bluetooth.servicelp 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 bluemanbluetoothctl:
bluetoothctl -- <cmd>.bluetoothctllistselect <mac>power onscan ondevicesagent ondefault-agentpair <mac>trust <mac>connect <mac>Ctrl+D/etc/bash_completion.d (might already exist)./etc/profile.d/completion.sh, see the example below.sudo pacman -S most.bashrc and/or .zshrc, set export PAGER=mostsudo pacman -S vlcyay -S miragesudo pacman -S gimpsudo pacman -S thunarsudo pacman -S rangersudo pacman -S codeyay -S visual-studio-code-binsudo pacman -S libreoffice-freshsudo pacman -S okularsudo pacman -S maimsudo pacman -S flameshotfireshot guisudo pacman -S hyprshotbind = SUPER, PRINT, exec, hyprshot -m window --clipboard-onlybind = , PRINT, exec, hyprshot -m output --clipboard-onlybind = SUPER SHIFT, S, exec, hyprshot -m region --clipboard-onlyyay -S p7zip-gui.7z file format, it doesn’t preserve owner info.sudo pacman -S remmina freerdpsudo pacman -S nmap tcpdump wireshark-qtxdg-settings set default-web-browser firefox.desktopFile: /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=no
LLDP=yes
EmitLLDP=no
[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
Token=prefixstable
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=network
# 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/dunst/dunstrc
[global]
monitor = 1
origin = top-left
#scale = 1
font = MesloLGS NF 8
background = "#333"
frame_color = "#888"
foreground = "#eee"
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/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
File: ~/.config/hypr/hypridle.conf
general {
lock_cmd = pidof hyprlock || hyprlock
before_sleep_cmd = loginctl lock-session
after_sleep_cmd = hyprctl dispatch dpms on
}
# 10 minutes: Turn down monitor backlight
listener {
timeout = 600
on-timeout = brightnessctl -s set 10
on-resume = brightnessctl -r
}
# 10 minutes: Turn off keyboard backlight
listener {
timeout = 600
on-timeout = brightnessctl -sd *:kbd_backlight set 0
on-resume = brightnessctl -rd *:kbd_backlight
}
# 15 minutes: Lock screen
listener {
timeout = 900
on-timeout = loginctl lock-session
}
# 20 minutes: Turn off screen
listener {
timeout = 1200
on-timeout = hyprctl dispatch dpms off
on-resume = hyprctl dispatch dpms on && brightnessctl -r
}
# 30 minutes: Suspend PC
listener {
timeout = 1800
on-timeout = systemctl suspend
}
File: ~/.config/hypr/hyprpaper.conf
# Images to preload
preload = ~/Pictures/desktop.jpg
# Preloaded images to use on different screen (replace "monitor" or leave empty before comma to use on all)
wallpaper = monitor, ~/Pictures/desktop.jpg
lsblkcryptsetup luksOpen /dev/<partition> crypt_rootmount /dev/mapper/crypt_root /mntmount /dev/<partition-1> /mnt/boot/efiarch-chroot /mntgrub-install --target=x86_64-efi --efi-directory=/boot/efi && grub-mkconfig -o /boot/grub/grub.cfgmkinitcpio -PIf 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/procmount --rbind /sys /mnt/sysmount --rbind /dev /mnt/devrm /mnt/etc/resolv.conf; echo nameserver 1.1.1.1 > /mnt/etc/resolv.confrm /mnt/var/lib/pacman/db.lckcp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlistpacman --sysroot /mnt -Qq >tmp.txtpacman --sysroot /mnt -S --overwrite "*" - <tmp.txtchmod 700 /mnt/bootln -sf /run/systemd/resolve/stub-resolv.conf /mnt/etc/resolv.confyay -Qqm | yay -S -