Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Desktop layout for Omarchy / Hyprland

Save and restore tiled window layouts across workspaces: which app sits where, left-to-right / top-to-bottom order, and width + height.

Omarchy’s Hyprland Lua dispatchers (hl.dsp.*) do not understand classic hyprctl dispatch movetoworkspacesilent. This plugin talks Lua, probes tiling split direction (so +40px does not shrink the window), then walks every window toward the saved size.

Does not launch apps. Chrome / Telegram / etc. must already be opening (session restore or autostart). Then the layout is applied on top.

Install

omarchy plugin add https://github.com/gzaal/omarchy-desktop-layout.git --enable

Add to ~/.config/hypr/bindings.lua (use Home, not HOME):

o.bind("SUPER + SHIFT + Home", "Save desktop layout", "omarchy-shell gzaal.desktop-layout save")
o.bind("SUPER + CTRL + Home", "Restore desktop layout", "omarchy-shell gzaal.desktop-layout restore")

Reload Hyprland (hyprctl reload or log out).

Optional login restore — add to ~/.config/hypr/autostart.lua:

o.launch_on_start("bash -lc 'sleep 15; omarchy-shell -q gzaal.desktop-layout restore'")

Remove

omarchy plugin remove gzaal.desktop-layout

Then delete the two o.bind lines (and the optional autostart line) from your Hyprland config. The snapshot at ~/.local/state/omarchy/desktop-layout.json is left in place; delete it if you do not want it.

Keys

Shortcut Action
Super+Shift+Home Save layout of workspaces 1 and 2
Super+Ctrl+Home Restore it

Do not confuse with Omarchy’s Super+Home / Super+Alt+Home (single-window width).

On Logitech MX Keys, Home may need Fn.

CLI

python3 ~/.config/omarchy/plugins/<install-dir>/desktop-layout.py save
python3 ~/.config/omarchy/plugins/<install-dir>/desktop-layout.py restore

Snapshot file: ~/.local/state/omarchy/desktop-layout.json

Override workspaces:

OMARCHY_DESKTOP_LAYOUT_WORKSPACES=1,2,3 python3 desktop-layout.py save

Limitations

  • Matching is by window class + title. Chrome tab titles can drift; save again after a big tab change.
  • Does not start missing applications.
  • Dwindle/scrolling trees cannot always reproduce an arbitrary split; widths converge over a few resize passes.

License

MIT

About

Omarchy plugin: save and restore tiled Hyprland window layouts

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages