Hyprland Experiences
I’ve been playing around with Hyprland for a couple weeks now. I was just going to experiment with it on my NixOS laptop, but decided I really needed to immerse myself in it more than that so I installed it on my main desktop as well. It has been a huge mental shift going from a typical stacking window manager to a tiling window manager. There is something about being able to quickly arrange and navigate your windows with just the keyboard that is exhilarating. It also had me looking up key bindings for some of my more used apps like VS Code so that I could avoid having to use the mouse.
Of course, you are never really going to get completely away from using the mouse. Only a madman would try to navigate a web browser links with just the keyboard. I’m sure there are some plugins or maybe even some built in accessibility tools that can help with that, but I’m not quite to that point yet. The mouse definitely still has it’s place, but it feels great to not have to drag windows around trying to get them into just the right place where I can see info I want to see at a glance.
If anyone is interested, here’s a link to a quick video I put together to demo some of the parts of Hyprland. My video editing skills are not great, but it hopefully gives a little preview of how a tiling window manager operates.
What’s wrong with Windows 11 tiling?
You might be wondering what is different between a tiling window manager and the tiling built into Windows 11. The main difference is that windows tile by default in a tiling window manager. There is no need to tile them manually. Also, there are a lot more key binds to navigate and work with tiled windows and they are easily configurable. Windows has some basic keybinds for snapping windows to the edges, moving them to different monitors, and switching between workspaces, but if you want much beyond that, you need to install a 3rd party tool.
If you do want to experience a tiling window manager in Windows 11, there are options, though. I have been testing out GlazeWM on my work laptop and have been fairly impressed with it. It seems to offer a very similar experience to Hyprland, even letting you temporarily maximize a window and then put it right back to its tile with just the stroke of a key. I have run into some weirdness with it, though. If you are using it, use its own workspaces. Don’t try to switch to one of the built in Windows workspaces or you will mess up the tiles of the current workspace. I’ve also run into it doing some weird things with Remote Desktop. There have been a couple of times I had to exit GlazeWM because it just wouldn’t let me bring up my fullscreen Remote Desktop client
Turning Hyprland into a full desktop environment.
Before I start describing my setup, I should note that the way I went about this is completely optional. You can get some preconfigured setups as a starting base and then make your own tweaks from there. Hyprland is a very minimal system out of the box and doesn’t provide a full desktop environment on its own, so starting with one of these setups can save you a lot of extra work. Since I enjoy this sort of setup work, I actually found it kind of exciting to start from scratch because it meant I got to build out everything exactly how I wanted, and I’d have a better understanding of how everything worked together.
I started out following a series of YouTube videos by typecraft. He did an excellent job of breaking down the different parts you need to put together your own desktop environment. I strayed from his setup in a few places and once I had the basics in place, I started digging into the Wikis of the various components so that I could really start to make it my own.
When he got to the styling video, he mostly just copied some dotfiles without going too deeply into them. I know it was to save a bit of time for the video, but I wanted to understand all the parts a bit more thoroughly so I tried to start everything from scratch and really read through the documentation. I’m pretty happy with my setup as it stands, but I also know that there are so many things I can tweak that I will probably never really be able to say that it is “finished.”
The following are some configuration items and additional packages I used to put together a full desktop environment experience.
Keybinds
I should talk a little bit about keybinds. Hyprland starts you off with a few defaults, but it doesn’t setup much more than the basics. There are a bunch of features it leaves unmapped. In other words, it doesn’t force its opinions on you and lets you decide for yourself how you want to map things. In my case, I moved a lot of mappings away from using the default SUPER/Windows key as the main mod and used ALT instead. This was mostly due to the fact that the laptop I’m running on is an MSI Gaming laptop, which conveniently puts the Windows key on the right side of the keyboard in order to try and prevent those accidental moments when you are at a critical part of a game and your finger slips and you hit the dreaded windows key. This is great for gaming, but makes it awkward when I want to use vim-style bindings for my directional commands. Being a fan of vim, that was what I wanted to do because I am very comfortable using hjkl for left, down, up, right. That said, there are some commands I moved to WIN+arrows because I am not sure I will use them as much, such as grouping windows together. I may revisit this if I find myself using them more often.
GNU stow
GNU stow isn’t really a critical component of a Hyprland setup, and isn’t used directly, but it made things so much easier to sync up changes I made on both my laptop and desktop systems. It essentially provides a way to quickly setup symlinks so you can store the actual config files in a git repository. Once I had all the symlinks pointing there, my process was as simple as making changes on one system, pushing those changes to my GitHub repo, then pulling them down to the other system.
waybar
This provides a status bar. It displays as little or as much as you’d like. It has 3 main regions, left, center, and right and you can put modules in any of those containers in any order you would like. You can also configure it to display on any edge of the screen you want. You will want to make sure you install an appropriate Nerd Font or Font Awesome font for the icons to show up appropriately.
I have it positioned at the default position at the top of the screen. The modules I’m using are:
Left:
- hyprland/workspaces - Displays the workspaces on each monitor and indicates which one is active
- custom/daysoflinux - This is a custom script I put together that gives me a tracker for how many days it’s been since I switched over to Linux as my main system. Currently it is sitting at 474d.
- hyprland/window - Gives you the window title of the currently active window
Center:
- clock - Just what it sounds like. It will also show the current month calendar when you hover over it, and clicking it will toggle the current date.
Right:
- idle_inhibitor - This gives you a little toggle you can use if you want to prevent any sort of idle processing from happening. I haven’t used it, but could see it being useful if you need to just stare at the screen for a while and don’t want the monitor turning off on you.
- network - Displays ethernet/wifi status. I configured this a bit because I didn’t really need it to show me my IP address
- pulseaudio - Gives current volume of speakers and mic. Clicking it brings up the pulseaudio mixer.
- cpu - Gives the cpu usage as a percent
- memory - Gives memory useage as a percent
- temperature - Gives the CPU temperature
- keyboard-state - Caps/Numlock status. This is useful for those annoying keyboards that don’t give you an indicator on the keyboard itself anywhere.
- battery - Battery life if you are on a laptop.
- tray - Shows apps that like to sit in the system tray like Discord
- custom/wlogout - Pulls up a wlogout menu for the typical logout actions like lock, sleep, hibernate, shutdown, reboot, or just simply log out.
About the only thing I’m considering adding is a module for weather. I’ll probably configure it to show current temperature for my location, providing more detail on a hover. I’ll probably place this next to the clock.
Waybar can also be styled however you want using CSS. I styled mine so all 3 sections are in their own bars with nicely rounded corners and tried to select some colors that somewhat matched my desktop wallpaper.
wofi
Wofi is a simple application launcher. I have it bound to alt-space. It pops up a little menu with a list of applications that you can quick search through by typing. It seems to remember the last applications launched and puts them near the top so you can quickly launch all of your usual apps. It’s easily customizable with a bit of CSS. I tried to follow a similar color scheme to my waybar theme.
hyprlock
Hyprlock does just what it sounds like it does. It locks your screen. This is configured through a configuration file that lets you do a number of cool things. You can either provide it an image, or you can have it take a screenshot of your current screen. You can then apply various effects like blur or grain. You can also put components on the screen like a clock and an input field to enter your password for logging in.
I currently just have it displaying a blurred version of my desktop image with the date/time displayed at the top and the input box in the middle of the screen for logging back in. It’s mostly the default settings except that I switched it from screenshot mode to showing my desktop image.
hyprpaper
In order to configure my desktop wallpaper, I had to install hyprpaper. It has a number of config options, but I am just using it for a simple desktop image on all monitors.
hypridle
Hypridle is another app that does just what you think it should do. It handles idle processing. You can have it trigger your lock screen, suspend, or sleep the system. You can also have it execute apps to turn off or dim the screen or back lights using another app called brightnessctl.
I hate when my systems go to sleep because I sometimes want to be able to ssh into them to do some maintenance. My config simply dims the screen after 5m, and locks the session after 10m. It turns the screen off completely after 30m.
mako
For notifications I went with mako. The typecraft video uses swaync, but I was having some trouble getting that to install on NixOS, so I just did a search for an alternative and mako seemed to be a good lightweight one. I also installed lib-notify in order to be able to test it from the CLI.
hyprshot
For taking screenshots, I installed a combination of hyprshot and swappy. Hyprshot is a basic screenshot utility that can take various types of screenshot and save them to a directory and/or put them into the clipboard. Swappy has some simple utilities to markup images. I’ve got one keybind to take a simple screenshot of the entire screen, and another that lets me take a screenshot of a region, and then pipes that into swappy to allow for marking it up with shapes, lines, text, etc. In order to achieve this, I bound the following command to my print screen key.
hyprshot --freeze --mode=region --raw --clipboard-only | swappy -f -
xdg-desktop-portal-hyprland
I ran into some issues when I tried to do some screensharing from MS Teams and Discord on my EndeavorOS system. It turns out, I was missing a package. I installed xdg-desktop-portal-hyprland and all was good. I didn’t run into this issue on NixOS so I think it came along with some of the other packages I installed there. I was even able to share my screen on Discord after doing this. I’ve stayed away from Wayland based DEs for a bit because a year ago that just didn’t seem to work properly.
cliphist
Cliphist is a tool that can be used to keep track of your clipboard history. There are a few things you have to setup with it to monitor the clipboard, but once it is working, it is a feature that is nice to have. I have it displaying the clipboard history within a wofi dialog. Image data doesn’t show up the nicest in it, but it works out great for text and unless you are copying a bunch of different images, the image entries should at least be usable.
hyprpolkitagent
Running VS Code and 1Password made me realize that I didn’t have a Polkit agent installed. Before this experiment, I couldn’t have told you what a Polkit agent even is. Basically, it’s the piece that will give you a login prompt whenever something needs an elevated level of security. Installing hyprpolkitagent solved all my issues with that.
wlogout
Hyprland provides a default keybind to exit hyprland and go back to GDM or SDDM, but I installed wlogout for a bit more flexibility. I have this triggered from a keybind, but also when I hit the power module in my Waybar bar. It can be styled with CSS, but I was having some issues resizing the buttons. By default they are huge. I gave up on it after a bit, but may return to that at some point.
Conclusion
Typing all this out has made me realize how much there really is in configuring a full Hyprland desktop environment. For the 1 or 2 people that even make it to the end of this, though, I’ve really enjoyed it. I’ve done a little bit of light theming in KDE Plasma and Xfce, but this is the first time that I really feel like the DE is all my own. I think I’m at a point where I’m fairly happy with it, but I also know there are probably always going to be little tweaks I’m going to want to continue doing to it. I also now fully appreciate all that goes into building a functional desktop environment.