Vault/linux/current_hyprland_installation.md

154 lines
4.4 KiB
Markdown
Raw Normal View History

2025-05-03 16:26:21 +08:00
# Introduction
2025-05-02 08:43:37 +08:00
This is a readme(more of a diary) for the current hyprland setup for my personal computer, how it was made, and what I have learned
2025-05-03 16:26:21 +08:00
# Base install
2025-05-02 08:43:37 +08:00
Use Archinstall, with default hyprland profile, it should come with qt5 and qt6, gtk3 and gtk4 is needed for a desktop environment, but not sure it is installed by default
kitty for the terminal emulator, ly for login manager(to avoid wallet problems later on, session manager is preffered to be installed here)
pipewire for audio server
For convenience, since I use Nvidia cards, the archinstall uses dkms drivers when using the proprietary settings, however the setup might be scuffed, so there is a need to check for the following post install
uvsm is currently scuffed in my current setup, so I do not know of a solution yet, but it is preinstalled with the Hyprland profile, just select the default hyprland session in ly instead of uvsm
2025-05-03 16:26:21 +08:00
# Post Install
## Nvidia
2025-05-02 08:43:37 +08:00
First thing to check after archinstall is if Hyprland can be started, if it does, then check the following for nvidia
2025-05-03 16:36:45 +08:00
- /etc/mkinitcpio.conf
- MODULES=() containing:
- nvidia
- nvidia\_modeset
- nvidia\_uvm
- nvidia\_drm
- HOOKS=() removing:
2025-05-02 08:43:37 +08:00
-kms
2025-05-03 16:36:45 +08:00
- /home/user\_name/.config/hypr/hyprland.conf
- env = LIBVA\_DRIVER\_NAME,nvidia
- env = \_\_GLX\_VENDOR\_LIBRARY\_NAME,nvidia
2025-05-02 08:43:37 +08:00
I would also uninstall the dkms driver and replace it with the normal nvidia driver, after that, install the following:
install nvidia-utils and egl-wayland
2025-05-03 16:36:45 +08:00
2025-05-02 08:43:37 +08:00
install lib32-nvidia-utils if gaming, after allowing multilib repository
2025-05-03 16:26:21 +08:00
## Package manager
2025-05-02 08:43:37 +08:00
install yay, because I use yay
multilib repository should be enabled during archinstall
add a pacman hook by creating a new file /etc/pacman.d/hooks/nvidia.hook with the following code:
```
[Trigger]
Operation=Install
Operation=Upgrade
Operation=Remove
Type=Package
# You can remove package(s) that don't apply to your config, e.g. if you only use nvidia-open you can remove nvidia-lts as a Target
Target=nvidia
Target=nvidia-open
Target=nvidia-lts
# If running a different kernel, modify below to match
Target=linux
[Action]
Description=Updating NVIDIA module in initcpio
Depends=mkinitcpio
When=PostTransaction
NeedsTargets
Exec=/bin/sh -c 'while read -r trg; do case $trg in linux*) exit 0; esac; done; /usr/bin/mkinitcpio -P'
```
run full system update and restart pc while doing this
2025-05-03 16:36:45 +08:00
## Custom Hyprland Config Setup
2025-05-02 08:43:37 +08:00
First create a config file in the desired directory, simply copy and paste from the default config file under .config/hypr/hyprland.conf
With ly, it is most likely that it is using a .desktop file to execute hyprland by default, so we go to /usr/share/wayland-sessions/hyprland.desktop and edit the Exec line as such:
```
Exec=Hyprland -c /yourcustomdirectory/hypr/hyprland.conf
```
Restart the PC and the new config file will be used
2025-05-03 16:26:21 +08:00
## Hyprland Components
2025-05-02 08:43:37 +08:00
2025-05-03 16:36:45 +08:00
- notification daemon = mako
- desktop portal = xdg-desktop-portal-hyprland
- xwayland screensharing compat = xwaylandvideobridge
- auth-agent = hyprpolkitagent
- qt-libraries = qt5-wayland, qt6-wayland
- gtk-libraries = gtk3, gtk4
-
- status-bars = waybar, need to install otf-font-awesome as well for logos
- wallpaper daemon = swww
- wallpaper manager = waypaper
- app launcher = wofi
- clipboard manager = clipse
- network manager = nmtui
- file manager = dolphin
- text editor = nvim
- browser = chromium with vimium
- screenshot = hyprshot
2025-05-02 08:43:37 +08:00
need to add ```exec-once=waypaper --restore``` to allow for the wallpaper to exist after restart
2025-05-03 16:26:21 +08:00
## fonts
2025-05-02 08:43:37 +08:00
after downloading otf-font-awesome you might see that your fonts are fucked,you can use this opportunity to download a new font and use it:
2025-05-03 16:36:45 +08:00
- yay -S ttf-fira-code
- yay -S fontconfig
- mkdir ~/.config/fontconfig
- touch fonts.conf
- with the following code:
2025-05-02 08:43:37 +08:00
```
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match>
<edit name="pixelsize"><double>10</double></edit>
</match>
<alias>
<family>monospace</family>
<prefer><family>firacode</family></prefer>
</alias>
</fontconfig>
```
2025-05-03 16:19:47 +08:00
Some apps need manual changes to adjust their fonts such as:
- chromium/google-chrome
- Dolphin
2025-05-02 08:43:37 +08:00
2025-05-03 16:36:45 +08:00
## Chinese-Japanese-Korean(cjk) fonts
2025-05-02 08:43:37 +08:00
yay -S adobe-source-han-sans-otc-fonts
2025-05-03 16:26:21 +08:00
## docker
2025-05-02 08:43:37 +08:00
yay -S docker
2025-05-03 16:36:45 +08:00
2025-05-02 08:43:37 +08:00
sudo systemctl enable docker.server
2025-05-03 16:36:45 +08:00
2025-05-02 08:43:37 +08:00
sudo usermod -aG docker $USER
2025-05-03 16:26:21 +08:00
## git
just for automatic credential storing when not using ssh:
git config credential.helper store
git push