Skip to content

Startup Layouts

Gabriel Gonzalez Manana edited this page Oct 12, 2026 · 1 revision

Startup Layouts

hypr/scripts/startup-layout.sh arranges the apps at login, and again when you press End (work) or Super + End (off-work). It never closes or restarts a running app: open windows are moved and resized, and an app is launched only if it isn't open. Login picks off-work on weekends and on weekdays before 6 AM or from 7 PM.

How it builds a layout

It parks every app it manages out of sight, then brings them back one at a time:

dispatch 'hl.dsp.focus({ workspace = "2" })'    # go to workspace 2
slack=$(open slack slack)                        # first app fills the workspace
focus "$slack"; chatgpt=$(open chatgpt chatgpt)  # next app splits Slack
resize "$slack" 1074 "$(height_of "$slack")"    # then set sizes
  • open <window-class> <command> brings back that app's window, or runs the command if it isn't open.
  • LAYOUT_CLASSES near the top lists every app the script manages.
  • The work and off-work layouts are the two branches of each if [[ $mode == off ]] block.
  • The login hours are on the if (( dow >= 6 || hour < 6 || hour >= 19 )) line.

Workspace 2 (normal tiling)

Each new window splits the window focused just before it, landing to its right, or below it if that window is taller than wide. resize <window> <w> <h> sets a size in pixels; resize the left or top window of a pair, because resizing the right or bottom one moves the wrong edge.

Workspace 10 (scrolling)

Windows sit in centered columns. Each new window opens as a column to the right of the focused one.

  • stack <window> tucks a window under the column to its left.
  • column_width <window> 0.32 sets a column's width as a fraction of the screen.
  • set_height <window> 873 sets a window's height in pixels within its column.

Swap an app

  1. Open the app and find its window class:

    hyprctl activewindow -j | jq -r .class
  2. In startup-layout.sh, replace the app's open line and add the class to LAYOUT_CLASSES. For example, Spotify instead of ChatGPT:

    LAYOUT_CLASSES=(slack Spotify discord foot com.anthropic.Claude zen org.omarchy.agent)
    ...
    focus "$slack"; spotify=$(open Spotify spotify)

    Then rename any later $chatgpt references to $spotify.

  3. Press End or Super + End to rebuild and check it.

To add an app, add another focus …; name=$(open class command) line where it should split in. To drop one, delete its line.

Clone this wiki locally