Hyprland plugin: make apps' own minimize buttons work (parks window on special:minimized)
  • C++ 84.5%
  • Shell 9.7%
  • Makefile 5.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-21 21:29:42 +02:00
.gitignore Translate client-side minimize requests to special:minimized 2026-10-02 03:18:11 +02:00
load.sh Translate client-side minimize requests to special:minimized 2026-10-02 03:18:11 +02:00
main.cpp Hold listeners weakly and drop them on unload 2026-10-20 02:22:38 +02:00
Makefile Translate client-side minimize requests to special:minimized 2026-10-02 03:18:11 +02:00
pacman-hook.hook Translate client-side minimize requests to special:minimized 2026-10-02 03:18:11 +02:00
README.md Add vibe-coded disclaimer to README 2026-10-21 21:29:42 +02:00

hypr-csd-minimize

Vibe-coded. Built mostly with AI (Claude Code). Works for me, no guarantees. Use at own risk.

Hyprland ignores xdg_toplevel.set_minimized (and XWayland iconify), so the minimize button an app draws in its own titlebar (Vivaldi, Discord, VSCodium, Steam, ...) does nothing. This plugin listens for that request and calls lvxyMinimize() (defined in ~/.config/hypr/config/keybinds.lua), which parks the window on its own monitor's special:minimized-<monitor> workspace, the same as the minimize keybind. Restoring is up to you (keybind, taskbar); this only translates the request.

Idea and the stateChanged / requestsMinimize hook pattern come from omarchy-window-minimize; this drops its off-screen parking, Python state and maximize handling.

Requirements

  • Hyprland 0.56.x with its headers (Arch: the hyprland package ships /usr/include/hyprland)
  • g++ with C++26, make, pkg-config, and the hyprutils, hyprlang, aquamarine dev headers
  • hyprctl on PATH (the plugin shells out to it to move the window)

Build / load

make                          # builds libcsdminimize.so against /usr/include/hyprland
hyprctl plugin load $PWD/libcsdminimize.so

load.sh does the load and notifies on failure; call it from autostart. The .so is tied to the exact Hyprland version: pacman-hook.hook (install command inside) rebuilds it after updates, and the new build loads at next login. Tested on Hyprland 0.56.2 (nested instance + GTK iconify()).

Usage

Needs the global lvxyMinimize Lua function from the Hyprland config. Once loaded, any window that asks to be minimized is parked through it. Bring it back with your own binding, e.g. (Lua config):

hl.dsp.window.move({ window = "address:0x...", workspace = "<current ws>", follow = false })

Not done

  • Maximize: handled by suppress_event window rules, not here.
  • Restore-on-activate (e.g. tray click on a parked window).