Skip to main content
Workspaces in Glass represent your project environment, including open files, layout, panels, and project-specific settings. You can customize workspace behavior to match your workflow.

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 your settings.json:
settings.json
{
  "restore_on_startup": "last_session",
  "autosave": "on_focus_change",
  "confirm_quit": false,
  "active_pane_modifiers": {
    "border_size": 1.0,
    "inactive_opacity": 0.95
  },
  "centered_layout": {
    "left_padding": 0.2,
    "right_padding": 0.2
  }
}

Session Restoration

Control what Glass restores when you reopen it:
restore_on_startup
string
default:"last_session"
  • "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_on_file_reopen
boolean
default:"true"
Restore file state (selections, folds, scroll position) when reopening files in the same pane
settings.json
{
  "restore_on_startup": "last_session",
  "restore_on_file_reopen": true
}
Workspace state is persisted in a local database managed by crates/workspace/ using the WorkspaceDb for serialization and restoration.

Pane Management

Pane Splitting

Control how panes split when opening files:
settings.json
{
  "pane_split_direction_horizontal": "down",
  "pane_split_direction_vertical": "right"
}
pane_split_direction_horizontal
string
default:"down"
Direction for horizontal splits: "up" or "down"
pane_split_direction_vertical
string
default:"right"
Direction for vertical splits: "left" or "right"

Active Pane Styling

Highlight the active pane:
settings.json
{
  "active_pane_modifiers": {
    "border_size": 2.0,
    "inactive_opacity": 0.8
  }
}
active_pane_modifiers.border_size
number
default:"0.0"
Border width (in pixels) around the active pane. Set to 0 to disable.
active_pane_modifiers.inactive_opacity
number
default:"1.0"
Opacity of inactive panes (0.0 to 1.0). Lower values make inactive panes more faded.

Tab Management

settings.json
{
  "max_tabs": null,
  "tab_bar": {
    "show": true,
    "show_nav_history_buttons": true,
    "show_tab_bar_buttons": true,
    "show_pinned_tabs_in_separate_row": false
  }
}
max_tabs
number | null
default:"null"
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_layout": "contained"
}
bottom_dock_layout
string
default:"contained"
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
{
  "close_panel_on_toggle": false
}
close_panel_on_toggle
boolean
default:"false"
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
{
  "centered_layout": {
    "left_padding": 0.2,
    "right_padding": 0.2
  }
}
Padding values are relative to workspace width (0.0 to 0.5).

Zoom Mode

settings.json
{
  "zoomed_padding": true
}
zoomed_padding
boolean
default:"false"
Add padding when zooming into a pane

File Handling

Autosave

Configure automatic file saving:
settings.json
{
  "autosave": "on_focus_change",
  "autosave_delay": 1000
}
autosave
string
default:"off"
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 (see autosave_delay)
autosave_delay
number
default:"1000"
Milliseconds to wait before autosaving (when autosave is "after_delay")

File Deletion

settings.json
{
  "close_on_file_delete": false
}
close_on_file_delete
boolean
default:"false"
Automatically close files when they are deleted from disk

Drag and Drop

settings.json
{
  "drop_target_size": 0.2
}
drop_target_size
number
default:"0.2"
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_name": "My Project",
  "languages": {
    "TypeScript": {
      "tab_size": 2,
      "format_on_save": "on"
    }
  },
  "lsp": {
    "rust-analyzer": {
      "initialization_options": {
        "check": {
          "command": "clippy"
        }
      }
    }
  }
}
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
{
  "worktree": {
    "exclude_files": [
      "node_modules",
      ".git",
      "target"
    ]
  }
}

Adding Folders

  • Command: workspace: add folder to project
  • Menu: File → Add Folder to Project
Each folder becomes a worktree with its own file watching, indexing, and settings scope.

Window Behavior

settings.json
{
  "confirm_quit": false,
  "when_closing_with_no_tabs": "close_window",
  "on_last_window_closed": "quit",
  "window_decorations": "server"
}
confirm_quit
boolean
default:"false"
Show confirmation dialog before quitting Glass
when_closing_with_no_tabs
string
default:"close_window"
Action when closing the last tab:
  • "close_window" - Close the window
  • "keep_window_open" - Keep the empty window open
on_last_window_closed
string
default:"quit"
Action when closing the last window:
  • "quit" - Quit Glass
  • "keep_running" - Keep Glass running in the background

System Integration

Path Prompts

settings.json
{
  "use_system_path_prompts": true,
  "use_system_prompts": false
}
use_system_path_prompts
boolean
default:"true"
Use native OS file dialogs for open/save operations
use_system_prompts
boolean
default:"false"
Use native OS dialogs for confirmations and alerts

Window Tabs (macOS)

settings.json
{
  "use_system_window_tabs": false
}
use_system_window_tabs
boolean
default:"false"
Use macOS native window tabs instead of Glass workspaces

Command Aliases

Create shortcuts for common terminal commands:
settings.json
{
  "command_aliases": {
    "gst": "git status",
    "gcm": "git commit -m",
    "gp": "git push"
  }
}
Aliases are available in Glass terminals and command runners.

Workspace Implementation

The workspace system is implemented in crates/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
Workspace state includes:
  • Pane layout and split directions
  • Open items and their state
  • Dock visibility and sizes
  • Active item and focus state
All workspace state is automatically persisted and can be restored on restart through the restore_on_startup setting.
Use multiple workspaces to organize different projects or contexts. Each workspace maintains its own layout, open files, and state.

Build docs developers (and LLMs) love