Skip to content

Instantly share code, notes, and snippets.

@Sewer56
Last active July 4, 2023 16:11
Show Gist options
  • Save Sewer56/e715c2cba53c600b4acea24a4a2d3dc3 to your computer and use it in GitHub Desktop.
Save Sewer56/e715c2cba53c600b4acea24a4a2d3dc3 to your computer and use it in GitHub Desktop.
[WIP] Linux Setup
# Install Steps
This is a log of installation steps to set up Arch on my machine. For future keeping.
## Install Arch
```bash
pacman -S archinstall
archinstall
```
## Install a Good Terminal Emulator
```bash
pacman -S kitty
```
Note: `Ctrl+Shift+C / V` do copy and paste.
## Install Text Editor
```bash
pacman -S vscode
# Remember to hide that menu bar in VSCode :wink:
```
## Fix DPI
```bash
nano ~/.Xresources
```
Insert desired DPI for apps:
```
Xft.dpi: 192
```
Then merge with current settings
```
xrdb -merge ~/.Xresources
```
Changes will apply after app restarts.
For screen DPI, use xrandr:
```
xrandr --dpi 192 --fb 7680x2160 --output DP-0 --mode 3840x2160 --output DVI-D-0 --scale 2x2 --pos 3840x0
```
Note: This is just temporary, later our screen will be controlled by sway+wayland.
## Install AUR Helper
```bash
pacman -S git -y
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
```
## Replace i3 with Hyprland
```bash
yay -S hyprland-nvidia
yay -S xorg-xwayland
yay -S wlroots-nvidia
pacman -S nvidia-dkms linux-zen-headers # necessary for prioprietary driver
```
Must enable direct rendering manager in kernel params:
```bash
nano /boot/loader/entries/...conf
```
Add
`nvidia_drm.modeset=1` to options, and while we're at it, disable mitigations `mitigations=off`
And rebuild dkms
```bash
dkms autoinstall
```
And just in case...
```bash
mkinitcpio # also verify with --automods
```
For additional guidance, [see here](https://github.com/tyqualters/sway-nvidia-guide/blob/main/README.md).
```bash
sudo pacman -S polkit
sudo usermod -a -G seat sewer
sudo systemctl enable seatd
```
Disable DM:
```bash
systemctl disable display-manager.service
pacman -Rs lightdm lightdm-gtk-greeter
```
Install some packages:
```bash
sudo pacman -S vulkan-tools
sudo pacman -S vulkan-validation-layers
```
Update `~/.bash_profile`
```bash
export LIBVA_DRIVER_NAME=nvidia
export XDG_SESSION_TYPE=wayland
export GBM_BACKEND=nvidia-drm
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export WLR_NO_HARDWARE_CURSORS=1
export MOZ_ENABLE_WAYLAND=1 # (REQUIRED: Firefox will break otherwise.)
#export WLR_RENDERER=vulkan
export SDL_VIDEODRIVER=wayland
export QT_QPA_PLATFORM=wayland
export KITTY_DISABLE_WAYLAND=1
# Auto start
if [ -z "${WAYLAND_DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
exec Hyprland # auto start on boot
fi
```
Get QT for Wayland
```bash
pacman -S qt5-wayland
pacman -S qt6-wayland
```
Reboot.
## Install Resource Tracker
```bash
pacman -S btop
```
## Install Browser
```bash
pacman -S vivaldi
```
## Install Bragging Rights
```bash
pacman -S neofetch
```
## Audio Management
```bash
pacman -S pavucontrol
pacman -S playerctl # Keyboard Bindings
```
After installing, might need to go to `pavucontrol` and check the default device using the checkbox.
In my case this is `Starship/Matisse HD Audio Controller` under `Output` tab.
## Install IDE
`yay -S aur/rider`
`yay -S dotnet-sdk-7.0`
## Keyboard Lighting
`yay -S ckb-next`
`systemctl enable ckb-next-daemon`
`systemctl start ckb-next-daemon`
## Mouse Config
`pacman -S piper`
`piper`
## File Manager
`pacman -S ranger`
## Disable Mouse Accel (Sway)
Update Sway config:
```
input "1133:16511:Logitech_G502" {
accel_profile flat
}
```
For some reason `type:mouse` does not work.
## Fix Screen Capture on Chrome
```
pacman -S xdg-desktop-portal-wlr
# Update Config
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
```
## Update NV Driver
```
git clone https://github.com/Frogging-Family/nvidia-all.git
cd nvidia-all
makepkg -si
```
## Display Manager
```
pacman -S nwg-displays
pacman -S wlr-randr
```
## Import dotfiles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment