- C++ 84.5%
- Shell 9.7%
- Makefile 5.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DhaYnMhzmH2iBTqfnqm9CF |
||
| .gitignore | ||
| load.sh | ||
| main.cpp | ||
| Makefile | ||
| pacman-hook.hook | ||
| README.md | ||
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
hyprlandpackage ships/usr/include/hyprland) g++with C++26,make,pkg-config, and thehyprutils,hyprlang,aquamarinedev headershyprctlon 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_eventwindow rules, not here. - Restore-on-activate (e.g. tray click on a parked window).