Tiling window managers (TWMs) are a staple of the Linux desktop environment, known for their efficiency, minimalism, and customization potential. Among the many options available, Hyprland has been gaining traction as a modern and feature-rich alternative. With its sleek design, powerful performance, and emphasis on Wayland support, Hyprland is carving out a niche in the world of Linux desktop environments. This article will explore what Hyprland is, its features, and why it might be the ideal choice for your next tiling window manager.
What is Hyprland?
Hyprland is a dynamic tiling window manager designed for the Wayland display server protocol, which is considered the modern successor to the aging X11. While many traditional window managers like i3 and Sway focus on X11 or a hybrid setup with Wayland, Hyprland is built entirely with Wayland in mind from the ground up.
Hyprland is lightweight and highly customizable, allowing users to tailor their experience to their specific needs. It features dynamic tiling, where the layout of windows automatically adjusts as you open and close applications, maximizing screen real estate and providing an efficient way to manage multiple tasks simultaneously.
Key Features of Hyprland
- Wayland Native
Unlike many window managers that have only recently started to support Wayland (such as i3 or Sway), Hyprland is designed specifically for Wayland from the start. This results in a more stable, faster, and seamless experience on Wayland-based systems. Wayland offers improvements in rendering performance, security, and input handling compared to X11, making it an attractive option for those looking to take full advantage of modern Linux systems. - Dynamic Tiling and Layouts
Hyprland uses a dynamic tiling layout, meaning windows are automatically arranged in a grid or other patterns to use available screen space efficiently. Users can configure these layouts to their liking. In addition to traditional tiling layouts, Hyprland offers features like floating windows and custom layouts, giving users flexibility depending on the task at hand. - Customization and Configurability
Hyprland is designed with heavy customization in mind. Configuration files are written in a simple, human-readable format, making it easy to modify your setup. You can change keybindings, window rules, appearance, and much more. It supports both graphical and command-line utilities for configuring settings, giving you the freedom to personalize your environment. - Wayland Protocols and Features
Hyprland fully supports Wayland protocols such as wlroots, which allows the window manager to work with different compositors and Wayland clients. It also supports XWayland, enabling the use of legacy X11 applications on Wayland. Other features such as high DPI support, multi-monitor setups, and touchpad gestures are all native in Hyprland. - Advanced Compositing and Effects
Hyprland includes advanced compositing features such as animations, transparency, and shadows, which enhance the overall aesthetic of the desktop environment. These effects are built on top of the Wayland compositor, providing smooth performance and a modern look without sacrificing the speed or efficiency of the tiling window manager. - Performance and Efficiency
Being lightweight and efficient is one of Hyprland’s core values. It provides a snappy experience even on low-resource systems, thanks to its focus on only rendering what’s necessary. Hyprland is highly responsive and optimized for modern hardware, including support for GPU acceleration via Vulkan and other hardware-accelerated graphics technologies. - Multi-Monitor and Multi-Workspace Support
Hyprland excels in managing multi-monitor setups. It allows each monitor to have its own dedicated workspace, and windows can be moved between monitors seamlessly. Workspaces can also be dynamically resized or rearranged according to the user’s preferences. - Extensibility
Hyprland is extensible through a variety of scripting options and plugins. You can enhance your workflow by integrating external tools and software, or by writing custom scripts to automate tasks and configure your environment. Support for external tools like rofi (for application launching) or waybar (for a customizable status bar) allows for greater flexibility in how you interact with your system.
Installing Hyprland Ecosystem
While it’s possible to install the Hyprland compositor on its own, doing so means you’ll miss out on key features like a lock screen application, idle daemon, and screen sharing support. To fully leverage Hyprland’s capabilities, it’s recommended to install the complete ecosystem, which ensures all essential components and features work seamlessly together.
The Hypr ecosystem includes :
- hyprland – compositor
- xdg-desktop-portal-hyprland – portal for screen sharing
- hyprpicker – colour picker
- hypridle – idle daemon [similar to xidlehook]
- hyprlock – lock screen app
- hyprshot – screenshot app
- hyprsunset – redshift alternative for wayland ecosystem
- kitty – default terminal used by hyprland compositor [can be changed latter]
- dunst – default notification daemon used by hprland compositor [can be change latter]
- hyprpaper – wallpaper utility
- hyprprop – alternative of xprop on wayland ecosystem
# on archlinux based distros
sudo pacman -S hyprland hyprlock hypridle xdg-desktop-portal-hyprland hyprpicker hyprshot dunst kitty
yay -S hyprprop hyprsunset
Installing other useful tools and utilities
Here are several tools and utilities that can help you customize and enhance the appearance of your setup.
# for screenshots
sudo pacman -S grim slurp
# alternative of hyprsunset
sudo pacman -S wlsunset
# Better Wallpaper utilities than hyprpaper
sudo pacman -S swww waypaper
# For setting gtk themes on wayland ecosystem
sudo pacman -S nwg-look
# For setting qt themes on wayland ecosystem
sudo pacman -S kvantum
# For clicboard management
sudo pacman -S wl-clipboard
# panel
sudo pacman -S waybar
Setting up Hyprland
When you first install Hyprland on archlinux, your .config/hypr/hyprland.conf file will be automatically generated with a default configuration that looks something like this:
# This is an example Hyprland config file.
# Refer to the wiki for more information.
# https://wiki.hyprland.org/Configuring/
# Please note not all available settings / options are set here.
# For a full list, see the wiki
# You can split this configuration into multiple files
# Create your files separately and then link them to this file like this:
# source = ~/.config/hypr/myColors.conf
################
### MONITORS ###
################
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,auto
###################
### MY PROGRAMS ###
###################
# See https://wiki.hyprland.org/Configuring/Keywords/
# Set programs that you use
$terminal = kitty
$fileManager = dolphin
$menu = wofi --show drun
#################
### AUTOSTART ###
#################
# Autostart necessary processes (like notifications daemons, status bars, etc.)
# Or execute your favorite apps at launch like this:
# exec-once = $terminal
# exec-once = nm-applet &
# exec-once = waybar & hyprpaper & firefox
#############################
### ENVIRONMENT VARIABLES ###
#############################
# See https://wiki.hyprland.org/Configuring/Environment-variables/
env = XCURSOR_SIZE,24
env = HYPRCURSOR_SIZE,24
#####################
### LOOK AND FEEL ###
#####################
# Refer to https://wiki.hyprland.org/Configuring/Variables/
# https://wiki.hyprland.org/Configuring/Variables/#general
general {
gaps_in = 5
gaps_out = 20
border_size = 2
# https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
col.inactive_border = rgba(595959aa)
# Set to true enable resizing windows by clicking and dragging on borders and gaps
resize_on_border = false
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
allow_tearing = false
layout = dwindle
}
# https://wiki.hyprland.org/Configuring/Variables/#decoration
decoration {
rounding = 10
# Change transparency of focused and unfocused windows
active_opacity = 1.0
inactive_opacity = 1.0
shadow {
enabled = true
range = 4
render_power = 3
color = rgba(1a1a1aee)
}
# https://wiki.hyprland.org/Configuring/Variables/#blur
blur {
enabled = true
size = 3
passes = 1
vibrancy = 0.1696
}
}
# https://wiki.hyprland.org/Configuring/Variables/#animations
animations {
enabled = yes, please :)
# Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = easeOutQuint,0.23,1,0.32,1
bezier = easeInOutCubic,0.65,0.05,0.36,1
bezier = linear,0,0,1,1
bezier = almostLinear,0.5,0.5,0.75,1.0
bezier = quick,0.15,0,0.1,1
animation = global, 1, 10, default
animation = border, 1, 5.39, easeOutQuint
animation = windows, 1, 4.79, easeOutQuint
animation = windowsIn, 1, 4.1, easeOutQuint, popin 87%
animation = windowsOut, 1, 1.49, linear, popin 87%
animation = fadeIn, 1, 1.73, almostLinear
animation = fadeOut, 1, 1.46, almostLinear
animation = fade, 1, 3.03, quick
animation = layers, 1, 3.81, easeOutQuint
animation = layersIn, 1, 4, easeOutQuint, fade
animation = layersOut, 1, 1.5, linear, fade
animation = fadeLayersIn, 1, 1.79, almostLinear
animation = fadeLayersOut, 1, 1.39, almostLinear
animation = workspaces, 1, 1.94, almostLinear, fade
animation = workspacesIn, 1, 1.21, almostLinear, fade
animation = workspacesOut, 1, 1.94, almostLinear, fade
}
# Ref https://wiki.hyprland.org/Configuring/Workspace-Rules/
# "Smart gaps" / "No gaps when only"
# uncomment all if you wish to use that.
# workspace = w[tv1], gapsout:0, gapsin:0
# workspace = f[1], gapsout:0, gapsin:0
# windowrulev2 = bordersize 0, floating:0, onworkspace:w[tv1]
# windowrulev2 = rounding 0, floating:0, onworkspace:w[tv1]
# windowrulev2 = bordersize 0, floating:0, onworkspace:f[1]
# windowrulev2 = rounding 0, floating:0, onworkspace:f[1]
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
dwindle {
pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true # You probably want this
}
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
master {
new_status = master
}
# https://wiki.hyprland.org/Configuring/Variables/#misc
misc {
force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :(
}
#############
### INPUT ###
#############
# https://wiki.hyprland.org/Configuring/Variables/#input
input {
kb_layout = us
kb_variant =
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
touchpad {
natural_scroll = false
}
}
# https://wiki.hyprland.org/Configuring/Variables/#gestures
gestures {
workspace_swipe = false
}
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
device {
name = epic-mouse-v1
sensitivity = -0.5
}
###################
### KEYBINDINGS ###
###################
# See https://wiki.hyprland.org/Configuring/Keywords/
$mainMod = SUPER # Sets "Windows" key as main modifier
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Q, exec, $terminal
bind = $mainMod, C, killactive,
bind = $mainMod, M, exit,
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, V, togglefloating,
bind = $mainMod, R, exec, $menu
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Example special workspace (scratchpad)
bind = $mainMod, S, togglespecialworkspace, magic
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
# Laptop multimedia keys for volume and LCD brightness
bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+
bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%-
# Requires playerctl
bindl = , XF86AudioNext, exec, playerctl next
bindl = , XF86AudioPause, exec, playerctl play-pause
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous
##############################
### WINDOWS AND WORKSPACES ###
##############################
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# Ignore maximize requests from apps. You'll probably like this.
windowrulev2 = suppressevent maximize, class:.*
# Fix some dragging issues with XWayland
windowrulev2 = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0
The default config uses single monitor setup kitty as default terminal , dolphin as default file manager and wofi as default app launcher .
Writing Hyrland config from scratch
Multi monitor setup
If you’re using a single monitor, you can simply use the default monitor variable from the Hyprland configuration file. However, if you’re using multiple monitors, you’ll need to identify their names or IDs and configure their positions using the respective multi-monitor variables.
# print monitor ids/names
hyprctl monitors
Now that we have the monitor names, we can use the monitor variables to adjust and configure the relative positions of each monitor.
# set up 3 Monitors
monitor = DP-1, 1920x1080,3840x0,1
monitor = DP-2, 1920x1080,0x0,1
monitor = DP-3, 1920x1080,1920x0,1
# for single montior
monitor=,preferred,auto,auto
Set default workspace-1 to specific monitor
This is only relevant if you have a multi-monitor setup; otherwise, you can skip it.
# Assign default workspace-1 to mointor which is connected/detected as DP-3 with "hyprctl monitors" command
workspace = 1,monitor:DP-3
Persistent work-spaces
Persistent workspaces in Hyprland are workspaces that remain active even if they have no windows open. This means that you can switch to these workspaces at any time, even if they’re empty, and they’ll be ready for you to use. These workspace will be visible all the time on waybar.
workspace = 1, persistent:true
workspace = 2, persistent:true
workspace = 3, persistent:true
workspace = 4, persistent:true
workspace = 5, persistent:true
workspace = 6, persistent:true
Setting default applications
The default applications are controlled by three variables, which you can customize to suit your preferences. For instance, I use Thunar as my file manager and Rofi as my application launcher.
$terminal = kitty
$fileManager = thunar
$menu = rofi --show drun
Autostart application
Unlike other window managers like Qtile, which have dedicated files and code for autostarting applications, Hyprland handles everything through the exec-once variables. These variables control the execution of applications when Hyprland starts.
exec-once = /usr/bin/lxqt-policykit-agent &
exec-once = udiske &
Set a primary monitor
There is no concept of primary monitor in wayland but you can achieve similar results by :
exec-once = hyprctl dispatch workspace 1
Now wrkspace-1 will be focused by default when Hyprland starts.
Keybindings
In Hyprland, keybindings are managed through the bind variable.
Launching Applications and Executing Scripts
For launching apps and executing commands you will need to use exec parameter which is called dispatcher in hyprland.
$mainMod = SUPER # Sets "Windows" key as main modifier
bind = $mainMod, Q, exec, $terminal
bind = $mainMod, R, exec, $menu
bind = $mainMod, E, exec, $fileManager
#For binding keys without a modkey, leave it empty:
bind = , Print, exec, grim
# script execution
bind = $mainmod ,Z ,exec ,/home/desk/.config/rofi/launchers/type-3/launcher.sh
Workspace keybindings
Switch workspace
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
Move active window to a workspace
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
Move active window to a workspace without switching to that workspace
bind = $workMod, 1, movetoworkspacesilent, 1
bind = $workMod, 2, movetoworkspacesilent, 2
bind = $workMod, 3, movetoworkspacesilent, 3
bind = $workMod, 4, movetoworkspacesilent, 4
bind = $workMod, 5, movetoworkspacesilent, 5
bind = $workMod, 6, movetoworkspacesilent, 6
Change focused window
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
Change window location in workspace
bind = $mainMod CTRL,Left, movewindow, l
bind = $mainMod CTRL,Right, movewindow, r
bind = $mainMod CTRL,Up, movewindow, u
bind = $mainMod CTRL,Down, movewindow, d
Change monitor focus
If you have multiple monitors then you can change focus by using focusmonitor dispatcher/parameter .
bind = $mainMod,P,focusmonitor,1
bind = $mainMod,B,focusmonitor,2
bind = $mainMod,M,focusmonitor,0
Media key bindings
bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
# Requires playerctl
bindl = , XF86AudioNext, exec, playerctl next
bindl = , XF86AudioPause, exec, playerctl play-pause
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous
Brightness key bindings
bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+
bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%-
Full-screen and floating mode
You can set any app to floating or fullscreen mode using the fullscreen and togglefloating dispatchers.
bind = $mainMod,K,fullscreen
bind = $mainMod,Q, togglefloating
Resize windows
s can be done in two ways: you can either assign four keys to increase and decrease the window size, or use Hyprland’s submap functionality, which allows you to activate a separate set of keybindings once the primary binding is triggered.
# Using Direct mapping
binde = $mainMod, right, resizeactive, 10 0
binde = $mainMod, left, resizeactive, -10 0
binde = $mainMod, up, resizeactive, 0 -10
binde = $mainMod, down, resizeactive, 0 10
# Using submaps
bind = $mainMod, h,submap,resize
submap = resize
# sets repeatable binds for resizing the active window
binde = , right, resizeactive, 10 0
binde = , left, resizeactive, -10 0
binde = , up, resizeactive, 0 -10
binde = , down, resizeactive, 0 10
# use reset to go back to the global submap
bind = $mainMod ,l, submap, reset
With submaps, when you press SUPER+h, Hyprland will ignore all other keys except for Up, Down, Left, and Right, allowing you to resize the window accordingly. To exit this mode and return to normal, simply press SUPER+L. Without submaps, you would need four separate keys for resizing, but with submaps, only two keys are required.
Grouped/Tabbed/Stacked windows
Dwindle allows you to make a group with the togglegroup bind dispatcher, and cycle through it with changegroupactive.
A group is like i3wm’s “tabbed” container or stack layout in qtile. It takes the space of one window, and you can change the window to the next one in the tabbed “group”.
When creating the group, a group will be made from the current active window, and all children (recursively!) of the parent node. The new group’s border colors are configurable with the appropriate col. settings in the config section below.
# create a group
bind = $mainMod, n, togglegroup
# change active app in the group
bind = $mainMod, z, changegroupactive
Logout, shutdown and restart keybindings
# Logout
bind = $mainMod, F9,exit
# shutdhown
bind = $mainMod, Backspace,exec,shutdown now
# restart
bind = $mainMod, F12,exec,reboot
Pseudo dwindle toggle
This feature is a bit difficult to describe in words, but it’s worth trying a few times before deciding whether to keep using it. Personally, I find it quite interesting.
bind = $workMod, p, pseudo
Toggle split in dwindle
This is a feature of the Dwindle layout, which functions similarly to the Split layout found in other window managers like Qtile. You can use this to switch between vertical and horizontal splits.
bind = $workMod, s, togglesplit
Scratchpads / special workspaces
scratchpads are special, often temporary, windows that can be opened and hidden on demand. They are designed for quick access to applications or tools that you don’t need to keep open all the time but want to be able to bring up easily when needed. Examples include terminal windows, text editors, or reference documents.
Key Features of Scratchpads:
- Hidden by Default: Scratchpad windows are typically not visible in the workspace until you explicitly bring them up.
- Toggleable: You can open and close scratchpads using a keybinding or command, making them highly accessible without cluttering the workspace.
- Floating: Scratchpads are often displayed in a floating window, meaning they aren’t confined to the tiling layout and can be freely moved around the screen.
- Persistent: They stay open even if you switch between workspaces. The content remains intact when you bring them back up.
- Use Case: They’re great for applications you only need occasionally, such as a quick reference, notes, or a temporary terminal session.
In Hyprland, scratchpads are referred to as special workspaces. Here’s how you can set up a special workspace:
# show/hide special workspace
bind=$mainMod,Y,togglespecialworkspace
# move app to specical workspace without switchig to special workspace
bind = $mainMod,t, movetoworkspacesilent, special
# move to special workspace and swich to special workspace
bind = $mainMod,t, movetoworkspace, special
#To launch an application in a special workspace when Hyprland starts,
# Here i am running kttty terminal
exec-once = [workspace special] kitty
# To force apps to always run in special workspace
windowrule = workspace special, codium
Window rules
Window rules in Hyprland provide a powerful way to customize the behavior and appearance of individual windows based on their class name or title. These rules allow you to fine-tune your window management experience, tailoring it to your specific needs and preferences.
Here are some common use cases for window rules:
- Floating windows: You can set specific positions and sizes for floating windows, ensuring they always appear in your desired location.
- Tiling windows: Define tiling layouts for specific window classes, optimizing workspace organization.
- Fullscreen windows: Automatically make certain windows full screen when they open.
- Workspace : Forcing windows to open in a specific workspace.
windowrule = float, ^(lxqt-policykit-agent)$
# Float + move to specific location
windowrule = float, ^(yad)$
windowrule = move 600 40, ^(yad)$
# Forcing alarcityy to open in special workspace
windowrule = workspace special ,alacritty
# Forcing brave to open in workspace 1
windowrule = workspace 1 silent ,brave
# set the opacity of an
windowrule = opacity 0.8, Leafpad
# Forcing firefox to open in fullscreen mode
windowrule = fullscreen, firefox
# Set the size of floating window
windowrule = float, Leafpad
windowrule = size 600 600, Leafpad
Configuring waybar
Waybar is a highly customizable status bar that works seamlessly with Wayland compositors like Hyprland. It is written in C++ and designed to be fast, lightweight, and easy to configure. Waybar allows you to display various system information (such as CPU usage, RAM usage, battery status, and more) in a neat, clean, and visually appealing manner.
Key features of Waybar include:
- Extensive module support (e.g., weather, network status, clock, system resource usage).
- Complete customization via JSON and CSS.
- Integration with popular notification systems.
- Seamless compatibility with different Wayland compositors, including Hyprland.
Waybar’s configuration is typically stored in ~/.config/waybar/config.jsonc and ~/.config/waybar/style.css. These files control the layout, modules, and appearance of the bar
Basic config.jsonc which supports
- persistent workspace
- date/time
- system-tray
- cpu usage
- diskfree
- audio control (pavucontrol , volume up/down and mute)
{
"layer": "top",
"position": "top",
"spacing": 0,
"height": 37,
"modules-left": [
"hyprland/workspaces"
],
"modules-center": [
"clock"
],
"modules-right": [
"tray",
"cpu",
"memory",
"custom/diskfree",
"wireplumber"
],
"wlr/taskbar": {
"format": "{icon}",
"on-click": "activate",
"on-click-right": "fullscreen",
"icon-theme": "WhiteSur",
"icon-size": 25,
"tooltip-format": "{title}"
},
"hyprland/workspaces": {
"on-click": "activate",
"disable-scroll": true,
// "all-outputs": true,
"separate-outputs": true,
"warp-on-scroll": false,
"format": "{name}: {icon}",
"format-icons": {
"default": "",
"one": "",
"two": "",
"three": "",
"four": "",
"five": "",
// "active": "",
// "default": ""
},
"show-special": true,
"move-to-monitor": true,
"persistent_workspaces": {
"1": [],
"2": [],
"3": [],
"4": [],
"5": [],
"6": []
}
},
"cpu": {
"format": "⧯ Cpu: {usage}%" ,
"tooltip": false
},
"memory": {
"interval": 5,
"format": " Mem: {}%",
"max-length": 15
},
"tray": {
"spacing": 10
},
"clock": {
"tooltip-format": "{calendar}",
// "format-alt": " {:%a, %b %d %Y}",
"format": "⏱ {:%a, %b %d - %H:%M}",
"on-click": " yad --geometry='640x480' --calendar"
},
"wireplumber": {
"format": "{icon} {volume}",
"format-bluetooth": "",
"nospacing": 1,
"tooltip-format": "Volume : {volume}%",
"format-muted": "M",
"format-icons": {
"headphone": "",
"default": ["","",""]
},
"on-click": "pavucontrol",
"scroll-step": 1
},
"custom/pacman": {
"format": "{} ",
"interval": "once",
"exec": "pacman_packages",
"on-click": "update-system",
"signal": 8
},
"custom/diskfree": {
"format": "🖴 Disk: {} used",
"interval": 300,
"max-length": 20,
"exec": "df --total -hl | grep 'nvme0n1p2' | awk '{print $5}'"
}
}
Style.css
* {
border: none;
border-radius: 0;
font-family: "Fira Sans Semibold", "Font Awesome 6 Free", FontAwesome, Roboto, Helvetica, Arial, sans-serif;
font-size: 16px;
min-height: 20px;
}
window#waybar {
/* background-color: #2B2B2B; */
background-color: #1e1e2e;
transition-property: background-color;
transition-duration: 0.5s;
}
window#waybar.hidden {
opacity: 0.5;
}
#workspaces {
background-color: transparent;
}
#workspaces button.visible {
all: initial;
/* Remove GTK theme values (waybar #1351) */
min-width: 0;
/* Fix weird spacing in materia (waybar #450) */
box-shadow: inset 0 -3px transparent;
/* Use box-shadow instead of border so the text isn't offset */
padding: 2px 12px;
margin: 4px 3px;
border-radius: 4px;
background-color: #1e1e2e;
color: #928374;
}
#workspaces button.empty {
all: initial;
/* Remove GTK theme values (waybar #1351) */
min-width: 0;
/* Fix weird spacing in materia (waybar #450) */
box-shadow: inset 0 -3px transparent;
/* Use box-shadow instead of border so the text isn't offset */
padding: 2px 12px;
margin: 4px 3px;
border-radius: 4px;
background-color: #1e1e2e;
color: #504945;
}
#workspaces button {
all: initial;
/* Remove GTK theme values (waybar #1351) */
min-width: 0;
/* Fix weird spacing in materia (waybar #450) */
box-shadow: inset 0 -3px transparent;
/* Use box-shadow instead of border so the text isn't offset */
padding: 2px 12px;
margin: 4px 3px;
border-radius: 4px;
background-color: #1e1e2e;
color: #4e655c;
/* color: #83a598; */
}
#workspaces button.active {
color: #1e1e2e;
/* background-color: #cdd6f4; */
background-color: #8f6f1e;
}
#workspaces button:hover {
box-shadow: inherit;
text-shadow: inherit;
color: #1e1e2e;
background-color: #cdd6f4;
}
#workspaces button.urgent {
background-color: #f38ba8;
}
#cpu,
#memory,
#custom-diskfree,
#wireplumber,
#clock,
#tray {
border-radius: 4px;
margin: 4px 3px;
padding: 2px 12px;
background-color: #282c34;
color: #282c34;
}
#custom-diskfree {
/* background-color: #fc9867; */
/* background-color: #d65d0e; */
background-color: #1e1e2e;
color: #a3490d;
}
#custom-logo {
padding-right: 7px;
padding-left: 7px;
margin-left: 5px;
font-size: 15px;
border-radius: 8px 0px 0px 8px;
color: #1793d1;
}
#cpu {
/* background-color: #98be65; */
background-color: #1e1e2e;
color: #689d6A;
}
#memory {
/* background-color: #46d9ff; */
background-color: #1e1e2e;
color: #458588;
}
#wireplumber {
background-color: #1e1e2e;
/* color: #fabd2f; */
color: #88681e
}
#clock {
/* background-color: #cba6f7; */
background-color: #1e1e2e;
color: #B16286;
}
tooltip {
border-radius: 8px;
padding: 15px;
/* background-color: #131822; */
background-color: #1D2021;
}
tooltip label {
padding: 5px;
/* background-color: #131822; */
background-color: #1D2021;
}
Conclusion
Hyprland represents a bold step forward in the world of Wayland-based window managers. It combines the power and flexibility of tiling window management with the modern features of the Wayland protocol, offering a highly customizable and aesthetically pleasing environment for advanced Linux users. While still evolving, it is an excellent choice for those who want to harness the full potential of Wayland while maintaining a fast, keyboard-centric, and smooth desktop experience.
If you’re already using a tiling window manager like i3, Sway, qtile , xmonad or bspwm and want to explore the future of Linux window management on Wayland, Hyprland is definitely worth checking out.