Delta

what before after
laptop Asus UX501V Lenovo X1 Extreme Gen 3
CPU i7-6700HQ i7-10750H
GPU GTX 960M GTX 1650
RAM 16GB 64GB
bootloader Grub EFISTUB
OS Windows + Arch dualboot Windows + Arch dualboot
networking netctl systemd-networkd
dns/dhcp dhcpcd systemd-resolved
wifi wpa_supplicant iwd
display/login manager - ly?
display server X Wayland
window manager i3 Sway
bar i3blocks waybar
backlight xbacklight light
Gnight mode redshift ???
keymap setxkbmap, xcape, xmodmap sway (xkb_options), ???
terminal emulator urxvt alacritty (for now)
shell zsh zsh
shell highlighting zsh-syntax-highlight zsh-syntax-highlight
search tool ag [silver searcher] ag [silver searcher] + ripgrep? + fzf?
browser chromium chromium
system monitor htop htop (or bottom?)
aur helper packer packer
directory usage du dust
password manager pass pass
text editor vim emacs[-doom]
program launcher rofi wofi
image viewer feh sxiv (?)
pdf viewer zathura zathura
file browser terminal [+ranger] terminal + ranger + emacs(?)
calculator qalc qalc
screenshot teiler+scrot sway-interactive-screenshot???
music - spotifyd + spotify-tui
notificatoin deamon dunst mako???

see also: https://github.com/swaywm/sway/wiki/i3-Migration-Guide

unboxing

BIOS

  • swap Fn and Ctrl -> on
  • Make f1-f12 as primary function
  • Set sleep mode to linux preference
  • keyboard beep -> off
  • turn off security->secure boot; otherwise arch installation usb wont boot https://forums.lenovo.com/t5/ThinkPad-X-Series-Laptops/X1-6gen-won-t-boot-from-USB/m-p/4230171?page=1#4230185

  • [optional] move usb up in the bios->startup->boot order menu

windows

need to get through this to get to the next step.. use airplane mode (F8) or unplug router to not sign in to a microsoft account

new password

install chromium (disable password manager) delete edge disable hibernation disable virtual memory [on disk ram] -> saves 10GB shrink C volume in device memory

update drivers/bios using lenovo vantage

flash usb

https://archlinux.org/download/ https://wiki.archlinux.org/title/USB_flash_installation_medium

install arch

https://wiki.archlinux.org/title/installation_guide

  • single ext4 partition for the entire OS; i’m lazy here and ext4 has always worked fine for me

  • fstab: relatime -> noatime to not keep track of accesstimes

efistub

https://wiki.archlinux.org/title/EFISTUB

mount existing efi partition to /boot

  • may have to [re-]install the kernel to make sure vmlinuz-linux is written to the mounted efi partition at /boot
  • install intel-ucode
  • https://wiki.archlinux.org/title/Microcode
  • run efibootmgr command as explained, but add in the microcode part

Network

  • netctl vs network manager vs systemd-networkd [+wpa_cli]
  • iwd vs wpa-supplicant
  • dnsmasq dhcpcd systemd-resolved

  • https://bbs.archlinux.org/viewtopic.php?pid=1880580#p1880580

for now use the systemd packages: https://wiki.archlinux.org/title/systemd-networkd + iwd [which worked on first try!] https://wiki.archlinux.org/title/Iwd

add user

useradd -m philae

Wayland

pacman -S wayland

  • ttf-dejavu fonts https://www.reddit.com/r/archlinux/comments/2l2cr7/what_fonts_do_you_install_for_most_coverage_with/
  • nvidia-utils for opengl-driver

chromium

  • wayland native: exec /usr/bin/chromium --enable-features=UseOzonePlatform --ozone-platform=wayland
  • disable password manager (using pass instead)
  • TODO: full screen hack

Extensions

  • noscript
  • vimium
    • j/k for scroll, U/D for half page up/down, o for search, t for tab search
    • exclude urls to your liking ()
    • custom search engines: ```

      Documentation

      archwiki: https://wiki.archlinux.org/index.php?search=%s cpp: https://en.cppreference.com/mwiki/index.php?search=%s hoogle: https://www.haskell.org/hoogle/?hoogle=%s oeis: https://oeis.org/search?q=%s python: https://docs.python.org/3.7/search.html?q=%s wiki: https://en.wikipedia.org/w/index.php?title=Special:Search&search=%s Wikipedia

Translation

nlen: https://translate.google.nl/#nl/en/%s deen: https://translate.google.nl/#de/en/%s ende: https://translate.google.nl/#en/de/%s ennl: https://translate.google.nl/#en/nl/%s

Other

imdb: https://www.imdb.com/find?q=%s pe: https://projecteuler.net/problem=%s kattis: https://open.kattis.com/search?q=%s

  - custom key mapping:

tabs

search tabs

map t Vomnibar.activateTabSelection

detach tab to a new browser window

map D moveTabToNewWindow

Move to left/right tab

map H previousTab map L nextTab

Move backward/forward in history

map J goBack map K goForward

map <c-]> passNextKey normal

#searching is always in a new tab map a Vomnibar.activateInNewTab keyword=archwiki map c Vomnibar.activateInNewTab keyword=cpp map p Vomnibar.activateInNewTab keyword=python map w Vomnibar.activateInNewTab keyword=wiki

Un/pin a tab.

map gP togglePinTab

  - dont steal focus on load
  - search as regex
- minimal scrollbar: thin, transparent, auto-hiding scrollbars
- mublock origin
- darkreader
  - toggle site: `ctrl+shift+D`
  - toggle extension: `ctrl+shift+E`
  - I like a slightly lower than default contrast with a bit of sepia.
  - for github, stackoverflow, ... I prefer setting darkmode directly in my account
- nordvpn
- browserpass (-> pass)

# Setup
- transfer GPG key; new SSH key
- clone `pass` password store repo

# AUR helper: packer
- install factorio
- install `Xwayland`
  - use `xwininfo` to see if a window is using `xwayland`. The cursor turns to a plus if it is.
- factorio needs `xorg`
- GDK_BACKEND
- SDL_VIDEODRIVER
- install all of `xorg`

# Installed packages
- zsh-syntax-highlighting
- dust: better du [from aur], written in rust
- ruby, ruby-bundler, bundle install


# Emacs doom
- pacman -S emacs
- pacman -S ripgrep
  for searching from emacs
- https://github.com/hlissner/doom-emacs#install
- pacman -R vim (?)
- coming from vim, `<space>` as _leader_ is so much better!
- Discoverability is great too!
- projects and workspaces are cool (`SPA-p-p` and `SPA-TAB-*`)
- 
- TODO: save on focus loss
- TODO: swap function args https://www.reddit.com/r/vim/comments/1l9j4j/rearrange_function_arguments_easily/

# Wofi config
- window selector:
  https://www.reddit.com/r/swaywm/comments/krd0sq/sway_window_selector/

# SWAY Config

- keymap: `xkb_options: ctrl:nocaps`
- remove all shortcuts as clean-up
- swaylock default config
- disable borders: `default_border pixel`
- bind some programs: `bindsym $mod+c exec chromium`
- auto focus some programs: `bindsym $mod+i [app_id="Signal"] focus`
- keybindings

Media buttons

bindsym XF86MonBrightnessDown exec light -T 0.9 bindsym XF86MonBrightnessUp exec light -T 1.1

keyboard brightness

bindsym Shift+XF86MonBrightnessDown exec light -s sysfs/leds/tpacpi::kbd_backlight -U 50 bindsym Shift+XF86MonBrightnessUp exec light -s sysfs/leds/tpacpi::kbd_backlight -A 50

- swayidle, system exit:

set $mode_system System (l) lock, (e) logout, (s) suspend, (r) reboot, (Shift+s) shutdown, (c) cancel mode “$mode_system” { bindsym l exec –no-startup-id swaylock -f -c 000000, mode “default” bindsym e exec –no-startup-id swaymsg exit, mode “default” bindsym s exec –no-startup-id systemctl suspend, mode “default” bindsym r exec –no-startup-id systemctl reboot, mode “default” bindsym shift+s exec –no-startup-id systemctl poweroff, mode “default” bindsym c mode “default” }

- focus follows containers:

bindsym $mod+Shift+1 move container to workspace number 1, workspace 1

- Move to prev/next workspace/output
# Move to next/previous workspace/output
bindsym $mod+n			workspace next_on_output
bindsym $mod+p			workspace prev_on_output
bindsym $mod2+n		focus output right
bindsym $mod2+p		focus output left

# Move container to next workspace
bindsym $mod+shift+n	move container workspace next_on_output, workspace next_on_output
bindsym $mod+shift+p	move container workspace prev_on_output, workspace prev_on_output
# Move workspace to next output
bindsym $mod2+shift+n	move workspace to output right
bindsym $mod2+shift+p	move workspace to output left ```

waybar

  • https://github.com/hlissner/doom-emacs#install
  • pacman -S otf-font-awesome
    bar {
      swaybar_command waybar
    }
    
  • see backlight section
  • click on cpu opens htop: "on-click": "alacritty -e htop"

pass

  • install pass
  • Create the password store git repo at ~/.password-store
  • Create a GPG key if needed, and make sure at least one pinentry-* GUI backend is installed, and write ~/.gnupg/gpg=agent.conf with e.g. pinentry-program /usr/bin/pinentry-gnome3.
  • Install the native messaging host (pacman -S browserpass) and browser extension: https://github.com/browserpass/browserpass-extension#installation
    • choose either the chrome web store extension, or the browserpass-chromium package

Random shortcuts

Emacs:

  • dia, or caa: ..a is the argument motion, and deletes/substitutes function arguments, similar to diw and caw.

backlight / light

  • install light
  • add your user to video to allow changing brightness: usermod -aG video <user>
  • map on-scroll-up and on-scroll-down in waybar backlight module to light -T 1.1 and light -T 0.9
  • set the minimal brightness: light -N 0.2 in my case.

shell / ZSH

  • TODO: go over existing config and simplify it

TODO:

  • read ripgrep manual