Skip to content

Add optional project scratchpad system#5109

Closed
Bucurenciu-Cristian wants to merge 10 commits into
basecamp:devfrom
Bucurenciu-Cristian:feature/project-scratchpads
Closed

Add optional project scratchpad system#5109
Bucurenciu-Cristian wants to merge 10 commits into
basecamp:devfrom
Bucurenciu-Cristian:feature/project-scratchpads

Conversation

@Bucurenciu-Cristian
Copy link
Copy Markdown

The problem

When you work on multiple projects, switching context is painful. You lose track of which windows belong to which project, your terminal is in the wrong directory, and your tmux session is attached to yesterday's work. Alt-tabbing through 20 windows to find the right ones kills flow.

The solution

Project scratchpads give each project its own special workspace — a dedicated container for its windows, linked to a tmux session and project directory. Switch projects and everything follows: your workspace, your terminal, your context.

I've been using this system daily for the past 3 months across 7 active projects. This PR is the cleaned-up, omarchy-convention-compliant version of what's been running on my machine since January.

~/.config/hypr/projects.conf:

myapp|myapp|~/dev/myapp|active
sideproject|sideproject|~/dev/sideproject|pending

Install: omarchy-install-project-scratchpads
Uninstall: omarchy-uninstall-project-scratchpads (keeps your project list)

What you get

  • Per-project special workspaces — each project gets special:project:<name>, toggle it like a scratchpad
  • Tmux session sync — switching projects switches your tmux session (creates one if missing)
  • Walker-based picker — create, delete, shelve/unshelve projects through a fuzzy menu
  • Quick switchCtrl+Alt+1-9 jumps to project N instantly
  • Focus mode (opt-in) — hides shelved projects, adds a daily switch budget with "why are you switching?" prompts
  • Server detection — shows a indicator next to projects with running dev servers (bun, node, python, etc.)
  • Waybar widgets — project name indicator + focus stats with daily activity log

Keybindings (added by installer)

Binding Action
Super+; Toggle project scratchpad
Super+Alt+; Send window to scratchpad
Super+Shift+P Project picker
Ctrl+Alt+1-9 Quick switch to project N
Ctrl+Alt+Shift+1-9 Send window to project N

Dependencies

  • Required: tmux, jq (installer checks and tells you how to install)
  • Optional: fd (faster directory browsing when creating projects, falls back to find)

Files added

bin/omarchy-install-project-scratchpads     # Installer
bin/omarchy-uninstall-project-scratchpads   # Uninstaller (with confirmation)
bin/omarchy-project-scratchpad              # Core: toggle, send, state queries
bin/omarchy-project-select                  # Quick switch + tmux sync
bin/omarchy-project-picker                  # Walker CRUD interface
bin/omarchy-project-terminal                # Terminal in project context
bin/omarchy-project-indicator               # Waybar: current project name
bin/omarchy-project-stats                   # Waybar: focus stats + activity

8 self-contained scripts, 1,051 lines. No existing files modified. All follow omarchy conventions (omarchy- prefix, #!/bin/bash, 2-space indent, no shared libs).

Test plan

  • Fresh install on clean omarchy
  • Re-run installer (idempotent — no duplicates)
  • Create project via picker
  • Switch projects (Ctrl+Alt+1-9)
  • Toggle scratchpad (Super+;)
  • Shelve/unshelve with budget gate
  • Project terminal opens correct tmux session
  • Waybar widgets output valid JSON
  • Shellcheck clean (0 warnings)
  • Uninstall + reinstall cycle

Open to feedback — happy to adjust keybindings, rename scripts, refactor approaches, or split this into smaller PRs if that's easier to review. If anyone sees opportunities to make this faster or more idiomatic, I'm all ears.

State management and hyprctl dispatch for project-specific
special workspaces. Supports toggle, send, quick-switch, and
state queries.
Switches project context: updates state file, switches tmux
session (creates if missing), logs switch for daily tracking.
Interactive project management via walker --dmenu: create,
delete, shelve/unshelve with accountability prompts, focus
mode, server activity detection, and daily switch budget.
Opens user's default terminal attached to current project's
tmux session. Creates session if missing.
JSON output for waybar custom module showing active project
count, daily switch budget usage, and recent activity log.
Installer for project scratchpad system. Checks deps (tmux, jq),
bootstraps projects.conf, creates state directory, and injects
keybindings into bindings.conf with BEGIN/END markers.
Clean uninstaller with confirmation prompt. Removes keybinding
block (between BEGIN/END markers) and state files. Never
deletes projects.conf (user data).
- Use grep -c instead of grep | wc -l (SC2126)
- Prefix unused variable with underscore (SC2034)
- Remove unused PROJECT variable in terminal script (SC2034)
Shows current project name, position index, and window count
in waybar. Hidden when no project switch has occurred.
More ergonomic and consistent with the Super+Shift pattern
for project-related keybindings.
Copilot AI review requested due to automatic review settings March 24, 2026 10:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dhh
Copy link
Copy Markdown
Member

dhh commented Mar 26, 2026

Fascinating system, but it's a bit too much for default Omarchy. Might it make sense as an AUR package that folks can install? Thanks for exploring it!

@dhh dhh closed this Mar 26, 2026
@Bucurenciu-Cristian
Copy link
Copy Markdown
Author

Okay. Thanks for the feedback. I'll do this next week. It would be very nice to showcase it on the omarchy manual, after it's public and live, if you want this for sure.

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.

3 participants