Hyprland Config
Table of Contents
Hyprland Managin’ dem Windoz
I’ve written about the Wayland thing before, here I’m just talkin’ about my Hyprland configuration so it can be replicated later. I’ve tried to keep this as simple as possible without a ton of extra utilities and what have you as it becomes rather difficult to manage the fancier you make it. You can do on the fly color scheme matching to dynamic wallpapers in animated menus from quick access bars and stuff ya ya great but I’m just gonna stick to what works.
Hyprland General Setup
The initial part of the hyprland.conf file is the setup for the keyboard and some defaults. Kitty I’ve used for years I like it works well. And I’ve defined dmenu is the run prompt. The other thing thats CRUCIAL here is the keyboard setup which includes changing Caps Lock to Escape. Who uses Caps Lock you can just gUU if you’re feeling like you need to yell. Does someone sell a replacement key cap for a Thinkpad keyboard that fits in the CapsLock spot but says Escape?
monitor=eDP-1,1920x1200@60,0x0,1
exec-once = waybar & waypaper --restore
# Set programs that you use
$terminal = kitty
$fileManager = yazi
$menu = dmenu_run
# Some default env vars.
env = XCURSOR_SIZE,32
env = HYPRCURSOR_THEME,capitaine
env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = us
kb_options = caps:escape
follow_mouse = 1
touchpad {
natural_scroll = yes
}
sensitivity = 0 # -1.0 to 1.0, 0 means no modification.
}
Some Style Points
While simple, I gotta have some eye candy. A lot of this is defined here. Gaps, I wish I could change this on the fly (think Mango? hmm) as well as the slight rounding of the corners and some blur/shadow stuff. In Wayland I like this works without having another compositor running like Picom or Compiz where you have to define and get that working else where.
Another important thing here is the definition of the layout. I like the master and stack layout over the strange BSPWM way of managing windows. I only really do up to 3 on a tag so this works well because I can SUPER+SHIFT+ENTER to switch the master with another. Now I wish I could do a single window centered view, which sort of works with the commented out hacky solution there. Because Hyprland isn’t really layout based like Xmonad (or MangoWC hmm) it doesn’t really do what I want here, but we are livin’ with it.
general {
gaps_in = 10
gaps_out = 20
border_size = 0
col.inactive_border = rgba(595959aa)
layout = dwindle
allow_tearing = false
}
master {
orientation = center
slave_count_for_center_master = 0
mfact = 0.5
}
# centered solo window
# workspace = w[t1], gapsout:10 100
next = "cyclenext"
prev = "cyclenext prev"
decoration {
rounding = 5
rounding_power = 10
dim_inactive = true
dim_strength = 0.1
shadow {
enabled = true
range = 10
}
blur {
enabled = true
size = 3
ignore_opacity = true
passes = 3
}
}
animations {
enabled = no
}
Other thing to note here is the animations being disabled. Gah that makes me literally motion sick.
Keybindings
The third and literally final part of my config here is the keybindings. Honestly this is really close to the defaults, just changed a few things here. Of note would be I have changed the ‘move window to other tag’ to be “silent” which means the window goes but the view doesn’t I find I often move one window, then have to go chasing back to where I came from for another. Could be I’m just used to it this way as I think this is how I’ve always had it.
Other muscle memory things I’ve come to rely on would be SUPER+C to close windows, SUPER+ENTER to open a terminal, and from the Mac I’ve come to liking SUPER+SPACE to open the run prompt like you do by default on Mac for spotlight.
As far as tossin’ windows around, I like the SUPER+SHIFT+ENTER to put whatever window is focused on to the left hand master position, I use this all the time. Resizing the tiling split is also extra handy and I have that with just SUPER+H and SUPER+L to move where the windows are split back and forth. There are lots of other movements but really those are the ones I use. I could probably pair this down quite a bit.
The very end section used to be such a huge pain to figure out but I’m glad I have a handle on this now so its a non issue even if I switched to, say, MangoWC. The XF86 buttons are the names of the Thinkpad keyboard media keys. So those in conjunction with the commands that work in the terminal to change volume and brightness allow those to work without issue. Note brightnessctl is a program required as well as alsa-utils for the sound that comes with the amixer commands.
# Keybindings
$mainMod = SUPER
bind = $mainMod, RETURN, exec, $terminal
bind = $mainMod SHIFT, RETURN, swapnext
bind = $mainMod SHIFT, L, exec, hyprlock
bind = $mainMod, C, killactive,
bind = $mainMod SHIFT, Q, exit,
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, F, togglefloating,
bind = $mainMod, R, exec, $menu
bind = $mainMod, T, pseudo, # dwindle
# bind = $mainMod, M, layout, master # dwindle
bind = $mainMod, J, togglesplit, # dwindle
bind = $mainMod, H, resizeactive,-20 0
bind = $mainMod, L, resizeactive, 20 0
bind = $mainMod SHIFT, J, movefocus, u
bind = $mainMod SHIFT, K, 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, movetoworkspacesilent, 1
bind = $mainMod SHIFT, 2, movetoworkspacesilent, 2
bind = $mainMod SHIFT, 3, movetoworkspacesilent, 3
bind = $mainMod SHIFT, 4, movetoworkspacesilent, 4
bind = $mainMod SHIFT, 5, movetoworkspacesilent, 5
bind = $mainMod SHIFT, 6, movetoworkspacesilent, 6
bind = $mainMod SHIFT, 7, movetoworkspacesilent, 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
bind = $mainMod, SPACE, exec, dmenu_run -p "Choose Application:"
bind = $mainMod, N, exec, networkmanager_dmenu -l 30 -i
bind = $mainMod, V, exec, kitty --class float wiremix
bind = $mainMod, P, exec, hyprshot -m region -o ~/Pictures/scrots/
bindel=, XF86AudioRaiseVolume, exec, amixer set Master 5%+ unmute
bindel=, XF86AudioLowerVolume, exec, amixer set Master 5%- unmute
bindl=, XF86AudioMute, exec, amixer set Master toggle o
bindel=, XF86MonBrightnessUp, exec, brightnessctl -d intel_backlight set +1000
bindel=, XF86MonBrightnessDown, exec, brightnessctl -d intel_backlight set 1000-
I do like the, I think its generally called a ‘scratchpad’, special space Hyprland has to offer. I often just keep a single floating terminal window there so I can flip that over and have ’er floatin’ there for quick access to wiremix or something. I don’t really like having a million bindings to open apps up, I like the dmenu_run fuzzy application launcher and think its just as fast. The muscle memory translates better to other computers as well I think.
Utilities Used in Conjunction
One of the pain points of these window managers is how nothing is included. You can’t connect to wifi because there is no button to do so unless you add one somewhere. There are some pretty standard utilities people use but you can obviously get wild finding niche ones as well. Because I’ve often times been without basic features due to lack of personal brain capacity I’m stickin’ with the tried and true methods I figured out along the way.
- Wifi: NetworkManager comes with nmtui which works well, but I like networkmanager_dmenu because you can rescan without restarting the whole service lol, bound to SUPER+N
- Sound: Wiremixer, but I used pulsemixer for a while as well. Both work I just changed it to change it
- Bar: Waybar, ah waybar. I like this now that I understand how it works. I’ve even made some of my own modules! Having some difficulties understanding the style page but I have a few I’ve kept as backups from other people which I can just copy over to use essentially. I’ll make a separate breakdown of this.
- Media Keys: Brightnessctl and alsa-utils make this work for brightness controlling and volume respectively. See keybindings.