Zalgorithm

Adding commands to resize the active Hyprland window

I want to be able to resize floating, and especially pseudo-tiled Hyprland windows without using the mouse. Details about how to do this are on the Hyprland wiki.

Here’s the wiki’s code example:

# Switch to a submap called `resize`.
bind = ALT, R, submap, resize

# Start a submap called "resize".
submap = resize

# Set 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 = , escape, submap, reset

# Reset the submap, which will return to the global submap
submap = reset

# Keybinds further down will be global again...

Here’s what I did. It allows me to use my keyboard’s ROG key:

# see: https://wiki.hypr.land/Configuring/Binds/
bind = SUPER SHIFT code:201, R, submap, resize
submap = resize

binde = , H, resizeactive, -10 0
binde = , J, resizeactive, 0 10
binde = , K, resizeactive, 0 -10
binde = , L, resizeactive, 10 0

bind = ,escape, submap, reset
submap = reset

This didn’t require the use of the ROG key, but it’s nice to have an extra key available for key mapping.

Add a “resize mode” indicator to the Waybar status bar #

Related: notes / Restarting Waybar to test changes

The resize key map is great, but if I forget to exit it with the escape key, it can lead to unexpected behavior. To give some indication of what’s going on, I added a section to my ~/.config/waybar/config.jsonc file:

{
  "reload_style_on_change": true,
  "layer": "top",
  "position": "top",
  "spacing": 0,
  "height": 26,
  "modules-left": ["custom/omarchy", "hyprland/workspaces", "hyprland/submap"],
  "modules-center": [
    "clock",
    "custom/update",
    "custom/voxtype",
    "custom/screenrecording-indicator",
  ],
  "modules-right": [
    "group/tray-expander",
    "bluetooth",
    "network",
    "pulseaudio",
    "cpu",
    "battery",
  ],
  "hyprland/submap": {
    "format": "Mode: {}",
    "tooltip": false,
  },

What I added is just the hyprland/submap related lines.

References #

wiki.hypr.land. “Configuring Binds.” Accessed on: January 25, 2026. https://wiki.hypr.land/Configuring/Binds/ .