Hyprland: getting started (part 1)

In the past few months, I’ve heard (i.e., read articles and seen videos) many good things about the Wayland compositor Hyprland. I decided to try it, and I’ve been using it for almost one month as my daily driver. I’m still not into “tiling” that much, but in Hyprland, you can also switch to classic “stack” window management. I like Hyprland; it feels fast and reactive (also on a PineBook Pro; I’ll blog about Hyprland on a PineBook Pro in the future).

By the way, if you don’t already know:

Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn’t sacrifice on its looks. It supports multiple layouts, fancy effects, has a very flexible IPC model allowing for a lot of customization, a powerful plugin system and more.

This post is the first of a few articles showing how to install, configure and use Hyprland and additional tools. You can find many GitHub repositories with installation scripts and configuration files for Hyprland, but you end up with the configurations of those repositories, probably without understanding the basic details of Hyprland. I found starting from scratch (following the Hyprland wiki) much more helpful, taking inspiration from some of the above-mentioned GitHub repositories.

By the way, most Hyprland configurations you find on GitHub are primarily about “ricing” (i.e., heavy aesthetic customizations of the desktop). While I love good-looking desktops, I won’t blog about aesthetic customizations much. I’ll focus mostly on configurations and tools for usability.

This first post is only about getting started and having a usable environment with minimal helpful tools: there will be follow-up posts for installing other tools (like a bar and notification system) and configuring other programs (actually, I have already blogged about Variety in Hyprland).

Moreover, all these posts are about Hyprland in Arch Linux since that’s the only OS where I experimented with Hyprland. In particular, I’m using EndeavourOS.

First, install EndeavourOS without a desktop environment (when you get to the installer’s part, where you have to select a desktop environment).

I will use the AUR helper “yay”, which is already installed in EndeavourOS. On Arch, you’ll have to install it yourself, e.g., with the following commands:

Let’s start from https://wiki.hyprland.org/Getting-Started/Master-Tutorial/ and install Hyprland from the official Arch repositories:

As suggested, let’s install the terminal “Kitty” (the default Hyprland configuration has a shortcut to run that).

Of course, later, you can also install another terminal.

Now, you can execute “Hyprland” in your tty. (Remember, I haven’t installed any desktop environment or a login manager).

Note for virtual machines: If you test this in a virtual machine, ensure that 3D is enabled. Moreover, it’s crucial to start Hyprland with the following environment variables so that the mouse is usable; please, remember that the experience in a virtual machine will not be optimal anyway:

When Hyprland starts, you see a warning and a few pieces of information:

To make the warning go away, we edit the generated default configuration file (use either “vi” or “nano” text editors that are already installed in EndeavourOS). To do that, we must start a terminal: by default, the keyboard shortcut is “SUPER + Q” (as shown in the yellow warning):

Now we can edit the file .config/hypr/hyprland.conf and remove the following line:

Save the file, and the warning will go away. In fact, one of the cool features of Hyprland is that it automatically applies changes to that file.

Let’s change the configuration file further. By default, the configuration uses a US keyboard layout. I had to change it to use the Italian layout: Edit that file and change the following part accordingly (in my case, I have an Italian keyboard):

Save the file, and the new keyboard layout will be immediately set.

You might want to install “neofetch” and run it in a terminal (in this example, I’m running inside a KVM virtual machine):

The default configuration uses the shortcut SUPER + E to start the file manager “Dolphin”, which is not installed by default. You could install it. Here, I’m doing something different: Let’s install the file manager “nemo”:

and change the line

into

Let’s save the file, press SUPER + E, and Nemo appears (tiled automatically)

Let’s install the application launcher “wofi” (personally, I prefer “rofi”, but I’ll blog about that in the future):

Wofi is already configured with the following keyboard shortcut:

For example, let’s use SUPER + R and run Firefox (already installed in EndeavourOS) using Wofi: just start typing “fir” until it appears in the list, move the cursor down to select it, and press ENTER (or keep on typing the other letters til “firefox” is the only choice).

Let’s exploit the blur effects of Hyprland: let’s modify the Kitty configuration file (create it if it doesn’t exist) ~/.config/kitty/kitty.conf by adding this line:

Save it and start another instance of Kitty and enjoy the blur effect with the default Hyprland background:

If “0.5” is too much transparency, make the value a bit bigger.

Let’s make Nemo transparent as well with an Hyprland window rule. By default, Nemo is not transparent:

Let’s modify the Hyprland configuration file by adding this line:

Save and restart Nemo, which is now transparent:

The two values in “opacity” set the opacity for the window when it’s focused and not, respectively. By changing the above line as follows:

The Nemo window will be less transparent when active and more transparent when not focused.

Monitor(s) configurations are specified in the Hyprland configuration and are applied on the fly as soon as you save the configuration file. This is the default configuration:

The last value is the scale value. Try to change it to “1.5” or “1.75”, save, and see the scaling automatically applied.

Note that, by default, when running on a real computer (not a virtual machine), Hyprland already scales the display for high resolutions (e.g., it sets it to “1.5” by default).

Running from a Display Manager

The default installation already created a file in the appropriate folder to let SDDM start the Hyprland session.

Let’s install the AUR package “sddm-git” (we need the Git version to avoid a bug that has been fixed but not in the current release; when reading this post, the official package might have already been fixed) with yay:

Then, we enable the service at boot:

If we want to start it without rebooting, the first time we run:

And now you can enter Hyprland from here.

If you’re running inside a virtual machine, you lose the environment variables we saw above: “WLR_NO_HARDWARE_CURSORS=1 WLR_RENDERER_ALLOW_SOFTWARE=1”. To restore them, you must modify the “/usr/share/wayland-sessions/hyprland.desktop” accordingly, in particular, the “Exec” line:

Then, restart “sddm” (by switching to a tty):

Or by rebooting the system.

That’s all for now! Stay tuned for more posts about Hyprland 🙂

12 thoughts on “Hyprland: getting started (part 1)

  1. Jim Abernathy

    This sounds interesting. I also am not convinced I want tiling window manager all the time. I don’t have a Pinebook, but I have an old Macbook Pro that works well on EndeavourOS. That’s where I’ll be playing along at home.

    Reply
    1. Jim Abernathy

      Just finished duplicatiing your results on my Mackbook Pro 8,1. This looks pretty good for a WM.

      Reply
      1. Lorenzo Bettini Post author

        Thank you for the feedback! It’s great that it runs (smoothly?) on mac as well 🙂

        By the way, you don’t have to use tiling if you don’t want to in Hyprland.

        Reply
  2. Mark

    Really appreciate all your blogs and just wanted to let you know and thank you for it. The Snapper ones, now the Variety tip for Hyprland (using it right now) and many more things. Currently I am also using Hyprland (on Debian), next to KDE on Arch (on the laptop). Really interesting to read your musings. Thanks a lot! BR, Mark

    Reply
  3. Enrico

    Hi Lorenzo, I’d really like to follow your guide but after doing a clean install of endeavour os, i install hyprland and kitty but when i run ‘Hyprlans’ from tty i get the black screen, i tried to download the sddm graphic display but it’s the same… What could it be? Thank you

    Reply
    1. Lorenzo Bettini Post author

      Of course, you meant “Hyprland” not “Hyprlans”, right?
      If you get a black screen, maybe it’s due to your graphics card. Do you have an Nvidia?
      The wiki describes the additional steps to perform to have Hyprland work with Nvidia. I’m afraid I don’t have such a card, so I cannot help.

      Reply
  4. enviciri

    Sorry, I meant “Hyprland”… I don’t have Nvidia graphics card i have a Lenovo x230 with Intel, maybe it’s old.
    Thank you for the reply, Enrico

    Reply
    1. Lorenzo Bettini Post author

      mh… you might want to check the official wiki for known problems. I seem to remember that a black screen is a known symptom, so you could find a solution.

      Reply
  5. Sid

    Thank you for this guide Lorenzo! Helped the transition to hyprland a breeze. I had been using arch + i3wm for the last 8 years as my main driver and I was pretty happy with the snappiness, but it lacked the oomph and the buttery smoothness of modern macos or even windows for that matter. Thus far hyprland feels great, quite responsive.

    Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.