microsoft / microsoft/terminal
Terminal "badge" like function similar to iTerm2
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
# Description of the new feature/enhancement
Something akin to the "badge" functionality in iTerm2. This creates a configurable "badge" in the background of a terminal that can be used to denote whatever is wished. I personally use this feature when working with multiple cloud environments to differentiate between the different terminals
# Proposed technical implementation details (optional)
As for how to implement this, I am unsure but perhaps they could be added as a function to Terminal's improving theming?
At present this feature is called from a function within my .zshrc file(below)
```
set_badge () {
printf "\033]1337:SetBadgeFormat=%s\007" $(echo $1 | base64)
```
This can then be set by using
```
set_badge $VAR
```
or
```
set_badge "something with whitespace"
```
Example
Contributor guide
Research direction
Start with the .zshrc set_badge function and its OSC 1337 SetBadgeFormat sequence, then trace how Windows Terminal handles theming and terminal escape sequences. Done means agreeing on the badge's scope and configuration model, implementing the feature, and verifying that a value such as "something with whitespace" appears as a configurable terminal background badge.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, zsh
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100