You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This may fit better as a 💡 idea post, but I do have a theme to show.
I wanted a prompt that stays readable in a branchful Git workflow, including repositories that are also colocated with Jujutsu. Gravifer Tokyo keeps the palette of Oh My Posh's built-in tokyo theme, but replaces large capsules with a consistent bracket grammar and combines related SCM state into one visual unit.
The result is information-dense without making every piece compete for attention:
Git-only, JJ-only, and colocated Git+JJ repositories use the same visual grammar.
Jujutsu contributes its Change ID and JJ-only working-copy state.
Git contributes the branch, divergence, working/staging counts, stash count, and linked-worktree context.
Duplicate working-copy information is suppressed when Git already reports the same changed files.
The path is shortened around repository landmarks rather than uniformly abbreviating every directory.
Date/time, session, RAM, battery, execution time, and optional cloud/project context remain available on separate rows.
The theme is provisional and Windows/PowerShell-first, but it is the prompt I use rather than a static mock-up.
SCM modes
Git only
The Git bracket shows the branch and relevant divergence, working, staging, and stash state.
Jujutsu only
The JJ bracket shows the working-copy Change ID and status. The segment uses:
"ignore_working_copy": true
This is deliberate: rendering the prompt must not cause Jujutsu to snapshot or update the working copy.
Colocated Git and Jujutsu
When both repositories are present, the theme composes JJ and Git into one bracket rather than rendering two unrelated SCM capsules. JJ working-copy status is shown only when Git is not already reporting working or staged changes.
Since #7720 landed and shipped in v29.37.0, the theme renders .ChangeIDPrefix brightly and .ChangeIDRest dimly while preserving the same combined identifier.
Repository-aware path compression
Long paths inside Git repositories preserve the pieces I use for orientation:
the drive, home, or mapped origin;
useful context immediately below that origin;
the actual repository directory;
the first repository-relative component;
the current directory and the longest useful trailing context.
This behavior currently has to be expressed as a large Oh My Posh template expression in the theme configuration, using a fixed 52-character approximation. That experiment motivated #7722, which discusses a native, more general, cross-platform repository-aware Path style and the current lack of style-aware repository/path subparts.
UNC and other paths that the theme cannot align safely remain full rather than being guessed at.
Linked worktrees
In a linked Git worktree, the Git bracket can optionally show the owning main-worktree path.
Oh My Posh does not currently expose that path, so the gist includes a PowerShell context helper that prototypes the missing behavior:
Walk upward to the linked-worktree .git indirection file.
Resolve its common repository.
Run git worktree list --porcelain -z only for a genuine linked worktree.
Cache the result for the PowerShell session.
Pass the main-worktree path to the theme through an environment variable.
This helper is the concrete workaround targeted by #7737, which proposes a lazy native .MainWorktree property with repository-scoped session caching. The adjacent #7721 fixes a separate linked-worktree correctness issue in the existing gitdir_format option; the theme does not depend on that option.
Try it
The provisional theme, optional PowerShell helper, and my complete profile reference are in this gist:
The helper is PowerShell-specific and owns the global Set-PoshContext hook for that shell session. Its implementation is included precisely to demonstrate the bridge currently required for linked-main-worktree data.
Requirements and current scope
Tested with Oh My Posh 29.37.0.
PowerShell 7 for the optional context helper.
A Nerd Font.
Git for Git repositories and linked-worktree information.
Jujutsu when using the JJ segment.
Windows/PowerShell-first path behavior; this is not presented as a universal cross-platform policy.
The 52-character path target is currently an opinionated theme constant.
Status-enabled Git and JJ segments perform their normal repository queries.
The linked-worktree helper pays for one cold Git query per linked worktree and PowerShell session, then reuses its cached result.
The theme works on released Oh My Posh today. The upstream references above document released refinements and possible native replacements, not prerequisites.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I wanted a prompt that stays readable in a branchful Git workflow, including repositories that are also colocated with Jujutsu. Gravifer Tokyo keeps the palette of Oh My Posh's built-in
tokyotheme, but replaces large capsules with a consistent bracket grammar and combines related SCM state into one visual unit.The result is information-dense without making every piece compete for attention:
The theme is provisional and Windows/PowerShell-first, but it is the prompt I use rather than a static mock-up.
SCM modes
Git only
The Git bracket shows the branch and relevant divergence, working, staging, and stash state.
Jujutsu only
The JJ bracket shows the working-copy Change ID and status. The segment uses:
This is deliberate: rendering the prompt must not cause Jujutsu to snapshot or update the working copy.
Colocated Git and Jujutsu
When both repositories are present, the theme composes JJ and Git into one bracket rather than rendering two unrelated SCM capsules. JJ working-copy status is shown only when Git is not already reporting working or staged changes.
Since #7720 landed and shipped in v29.37.0, the theme renders
.ChangeIDPrefixbrightly and.ChangeIDRestdimly while preserving the same combined identifier.Repository-aware path compression
Long paths inside Git repositories preserve the pieces I use for orientation:
For example:
This behavior currently has to be expressed as a large Oh My Posh template expression in the theme configuration, using a fixed 52-character approximation. That experiment motivated #7722, which discusses a native, more general, cross-platform repository-aware Path style and the current lack of style-aware repository/path subparts.
UNC and other paths that the theme cannot align safely remain full rather than being guessed at.
Linked worktrees
In a linked Git worktree, the Git bracket can optionally show the owning main-worktree path.
Oh My Posh does not currently expose that path, so the gist includes a PowerShell context helper that prototypes the missing behavior:
.gitindirection file.git worktree list --porcelain -zonly for a genuine linked worktree.This helper is the concrete workaround targeted by #7737, which proposes a lazy native
.MainWorktreeproperty with repository-scoped session caching. The adjacent #7721 fixes a separate linked-worktree correctness issue in the existinggitdir_formatoption; the theme does not depend on that option.Try it
The provisional theme, optional PowerShell helper, and my complete profile reference are in this gist:
https://gist.github.com/Gravifer/7b27c219fed8f79cbdf1a2d123fac312
Download the reusable theme:
Initialize Oh My Posh with it:
For the optional linked-main-worktree display, also download and source the helper immediately after OMP initialization:
The helper is PowerShell-specific and owns the global
Set-PoshContexthook for that shell session. Its implementation is included precisely to demonstrate the bridge currently required for linked-main-worktree data.Requirements and current scope
The theme works on released Oh My Posh today. The upstream references above document released refinements and possible native replacements, not prerequisites.
Related upstream work
gitdir_formatin linked worktrees: merged linked-worktree correctness discovered during this work; not used by the current path expression.I would especially welcome feedback from people who use nested repositories, monorepos, linked worktrees, or colocated Git and Jujutsu:
All reactions