Feature request: support tiling windows
Feature Request
Summary
On Linux, I use i3wm, but there are several other tiling window managers to choose from. I almost always have a few terminal windows open and a browser. I like the keystrokes / bindings I can define to arrange the windows, and switch between them. You also get workspaces, so you can instantly switch between 10+ window arrangements and combination of windows.
iTerm2 provides splits, which are a similar scheme, but only within a single iTerm2 window.
What I propose is that in tiling mode (enabled by a menu pick, key shortcut, and/or settings):
- first iTerm2 window opens full screen.
- second iTerm2 window splits the screen in half (vertical or horizontal) and arranges the two windows so they each take up half the screen.
- third window divides in 1/3s.
- etc.
- a hot key toggles between next window open to the right or below the active one. Show a blue border on the side of the active window as a clue where.
- a hot key toggles the active window between full screen (maybe distraction free) and tiled mode.
- hot keys cmd-1 through cmd-0 select a workspace.
- each workspace has its own unique set of windows. If you change from workspace 1 to workspace 2, you hide workspace 1 windows and show the ones for workspace 2.
- shortcut keys cmd-shift-1 through cmd-shift-0 Moe the active window to the workspace specified.
- for multiple monitors (2 for example), you start with workspace 1 on the main monitor and workspace 2 on the other. This should be a setting so you can force iTerm to tile/work on the screen it was initially opened.
- show active workspace number in top application bar (where the menus are).
- scratchpad - hot key cmd-+ adds active window to the scratchpad. Cmd—- removes active scratchpad window and adds it to current workspace. The cmd-= cycles between scratchpad hidden, show 1st window in scratchpad, show 2nd..., etc. scratchpad appears on top of the tiled windows and can be dragged and resized.
- a shortcut key toggles active window between floating and in the tiled structure. Floating windows can be dragged and resized.
- rich key binding facility, including launching apps. I’d love to hit cmd-f1 to open a browser, cmd-f2 to open slack, and use alt+0 through alt-9 to have an additional 10 workspaces.
- windows can not be minimized, only hidden via full screen mode or switch or move it to another workspace or scratchpad.
- ideally, the windows have no title bar at all, to create more desktop space for the window client areas (content). Active window is indicated by bold border and the active cursor. Inactive windows can be dimmed.
- within the windows, the bulk of iTerm2 features should work. Splits. Maybe tmux integration, and so on.
This seems eminently doable. The app controls its windows and I would think MacOS APIs allow manipulation of the window sizes, positioning, minimize/maximize, show/hide, etc. I’m not sure if you can make windows not draggable, which would be ideal.
If you can figure out how to manage windows for other apps, so you can add a browser window tiled, and move it between workspaces, etc. - this is a great bonus, but not a requirement.
Alternatives
There are apps like magnet that allow for arranging windows. It has no specific interface with iTerm2 or any other applications.
Concerns
It does require some coding, and logic to track the workspaces and windows positions and states. Also keybindings (text file is fine) and settings extensions.
It doesn’t seem like a massive endeavor.