Skip to content

Add tile-quad and tile-dual scripts - #10

Merged
lukasjuhas merged 1 commit into
mainfrom
add-terminal-tiling-scripts
May 18, 2026
Merged

Add tile-quad and tile-dual scripts#10
lukasjuhas merged 1 commit into
mainfrom
add-terminal-tiling-scripts

Conversation

@lukasjuhas

@lukasjuhas lukasjuhas commented May 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • New src/bin/tile-quad opens 4 Terminal.app windows in a 2x2 grid
  • New src/bin/tile-dual opens 2 Terminal.app windows side-by-side
  • Both cd into a starting directory (default ~/projects, overridable via first arg)
  • Uses AppleScript via osascript to read screen bounds from Finder and set window bounds — no extra dependencies
  • src/bin/ is already on $PATH so the commands work directly once merged

Test plan

  • Run tile-quad from any terminal — first run will prompt for Automation permissions for both Finder and Terminal; approve both
  • Confirm 4 windows fill the screen as a clean 2x2 grid, each at ~/projects
  • Run tile-dual — confirm 2 windows fill the screen side-by-side
  • Run tile-quad ~/some/other/dir — confirm windows open in that directory
  • (Optional) Add ~/projects/dotfiles/src/bin/ to Raycast Script Commands and bind hotkeys

Notes

  • Tiling area excludes the menu bar and Dock automatically (uses Finder's desktop bounds)
  • Main display only — multi-monitor would need a rewrite using system_profiler or a Swift shim
  • For the second-desktop use case (2 columns), swipe to that Space and run tile-dual — macOS Spaces aren't reliably scriptable without yabai

Open Terminal.app windows tiled to a 2x2 grid or two side-by-side
columns, each cd'd to a starting directory (default ~/projects).
Pairs nicely with a Raycast hotkey for instant workspace layout.
@lukasjuhas
lukasjuhas merged commit e552819 into main May 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant