Workspace Basics
A workspace consists of:- Panes - Editors and panels arranged in a flexible layout
- Docks - Collapsible panels on the left, right, and bottom
- Project - One or more folders with their worktrees
- State - Open files, cursor positions, and UI layout
Workspace Settings
Configure workspace behavior in yoursettings.json:
settings.json
Session Restoration
Control what Glass restores when you reopen it:"last_session"- Restore all workspaces from your previous session"last_workspace"- Restore only the last workspace you used"none"- Start with an empty workspace
Restore file state (selections, folds, scroll position) when reopening files in the same pane
settings.json
crates/workspace/ using the WorkspaceDb for serialization and restoration.
Pane Management
Pane Splitting
Control how panes split when opening files:settings.json
Direction for horizontal splits:
"up" or "down"Direction for vertical splits:
"left" or "right"Active Pane Styling
Highlight the active pane:settings.json
Border width (in pixels) around the active pane. Set to 0 to disable.
Opacity of inactive panes (0.0 to 1.0). Lower values make inactive panes more faded.
Tab Management
settings.json
Maximum number of tabs per pane. When reached, least recently used tabs are closed.
null means unlimited.Dock Configuration
Customize dock behavior and layout:Bottom Dock Layout
settings.json
Bottom dock width behavior:
"contained"- Dock width matches the editor area"full"- Dock spans the full window width"left_aligned"- Dock aligns to the left"right_aligned"- Dock aligns to the right
Dock Toggling
settings.json
If
true, toggling a focused panel closes it. If false, focus returns to the editor.Layout Options
Centered Layout
Use centered layout for focused editing:settings.json
Zoom Mode
settings.json
Add padding when zooming into a pane
File Handling
Autosave
Configure automatic file saving:settings.json
When to automatically save:
"off"- Never autosave"on_focus_change"- Save when switching files or windows"on_window_change"- Save when switching Glass windows"after_delay"- Save after idle time (seeautosave_delay)
Milliseconds to wait before autosaving (when
autosave is "after_delay")File Deletion
settings.json
Automatically close files when they are deleted from disk
Drag and Drop
settings.json
Relative size (0.0 to 0.5) of drop zones at pane edges for split behavior. Larger values make it easier to split panes by dragging.
Project Configuration
Project-specific settings in.glass/settings.json:
.glass/settings.json
Project settings override user settings. Share project settings with your team by committing
.glass/settings.json to version control.Worktrees
Manage multiple folders in one workspace:settings.json
Adding Folders
- Command:
workspace: add folder to project - Menu: File → Add Folder to Project
Window Behavior
settings.json
Show confirmation dialog before quitting Glass
Action when closing the last tab:
"close_window"- Close the window"keep_window_open"- Keep the empty window open
Action when closing the last window:
"quit"- Quit Glass"keep_running"- Keep Glass running in the background
System Integration
Path Prompts
settings.json
Use native OS file dialogs for open/save operations
Use native OS dialogs for confirmations and alerts
Window Tabs (macOS)
settings.json
Use macOS native window tabs instead of Glass workspaces
Command Aliases
Create shortcuts for common terminal commands:settings.json
Workspace Implementation
The workspace system is implemented incrates/workspace/ with:
- Workspace - Main workspace entity managing panes, docks, and project
- Pane - Container for items (editors, terminals, etc.)
- PaneGroup - Hierarchical pane layout with splitting
- Dock - Collapsible panel container
- WorkspaceDb - Persistence layer for workspace state
- Pane layout and split directions
- Open items and their state
- Dock visibility and sizes
- Active item and focus state
restore_on_startup setting.