wayland+tiling+gorgeous special effects——Hyprland mixer simple experience

Original link: http://blog.fzdslr.cn/2023-06-02-hyprland-on-c302.html

foreword

I have to say that wlroots is a good thing, and many window compositors under Wayland are based on it. I’ve previously covered the Sway tiling window manager, also based on wlroots. Sway’s user experience is still very good, and daily use is relatively stable, but a major pain point is that it is not very beautiful-it does not support window blur and various animations, so that the screen will not tear when sliding the browser page There is no real sense of using Wayland at all (oh, there is no time to toss Xwayland). It just happened (?) that the screen of the chromebook pixel 2013 was broken before. After searching for a replacement screen, it would be better to pick up another foreign garbage chromebook, so now the daily chromebook has become ASUS C302A – a very standard 12-inch 2-in-1, supports touch operation and folding, and weighs only 1.1 kg. With a PD charger, it can be stuffed into a shoulder bag and run around. I tried to use the Hyprland window manager on this machine for a while, and the experience is not bad.

configuration effect

simple configuration

The configuration file is located at ~/.config/hypr/hyprland.conf . The difference from Sway’s configuration file is that after modifying and saving the configuration file, there is no need to manually refresh it, and Hyprland will automatically update it.

As with Sway, the first step in configuring Hyprland is to set up shortcut keys. Since I’m using a chromebook’s keyboard, I chose to make the Alt key the primary Mod key:

 1
 $mainMod = ALT

Then you can use $mainMod to refer to the ALT key in the subsequent configuration files. For detailed key bindings, refer to the official documentation .

The volume and brightness shortcut keys are written in the same way as Sway:

 1
2
3
4
5
6
7
 bind=, XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle
binde=, XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -2%
binde=, XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +2%
bind=, XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle

binde=, XF86MonBrightnessDown, exec, brightnessctl --device=intel_backlight set 3%-
binde=, XF86MonBrightnessUp, exec, brightnessctl --device=intel_backlight set +3%

For chromebook, input needs to configure kb_model = chromebook

Hyprland has two window tiling modes, which are divided into Dwindle Layout (similar to bspwm) and Master Layout (similar to i3), which can be selected according to your needs.

Hyprland natively supports switching workspaces with touchpad gestures (just configure the workspace_swipe_xxx option in gestures ). As for the switching direction of the workspace (up and down or left and right), it needs to be configured in the last item of animation = workspaces,...... in animations . I chose to slide up and down, so the last option is slidevert .

Status Bar

If you want to save trouble, using waybar is the most time-saving, but you cannot use the official version directly (the workspace cannot be displayed normally), you need to install waybar-hyprland in AUR. However, I always have a spare Sway on my computer, and if I install this branch, the waybar will not display the workspace properly on the sway. So I installed eww , it can also be used, but it is troublesome to write scripts.

app launcher

Just keep using Wofi. By the way, if you want to blur the translucent background of Wofi, you need to add a line blurls=wofi to the configuration file of Hyprland. But the cost of this approach is that there is a bug when typing in the input method in the Wofi frame, and the input method frame is suspected to be considered as a tiled window. However, under normal circumstances, the correct content can be selected by typing a few English letters, and there is no need to call the input method to input Chinese.

notify

Use mako.

theme

Configure GTK theme with lx-appearance , configure QT theme with Kvantum . The current color matching of the desktop mainly refers to Rose-pine .

wallpaper

I use sww , and I need to execute a small script every time I start the desktop:

 1
2
3
4
 #!/bin/bash

sww init
sww img image path

sww has a lot of optional special effects, but I have no need for real-time wallpaper changing, so I didn’t study it.

summary

Hyprland gives me the feeling of using it as a “sway with a more refined picture”, and its (relatively smooth) window effects bring out the advantages of Wayland over X11. Although sometimes there will be some small problems, but in general it is worth trying.

PS: Regarding this new chromebook, I may also write an article about the tossing process-as long as I have time…

This article is transferred from: http://blog.fzdslr.cn/2023-06-02-hyprland-on-c302.html
This site is only for collection, and the copyright belongs to the original author.