hyper-windowtint 0.3.6 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
# hyper-windowtint
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Colors every Hyper window based on the project folder its active tab is in. Open five Hyper windows against five different projects and you can tell them apart at a glance.
|
|
4
4
|
|
|
5
|
-
Groups
|
|
5
|
+
Groups sessions by project root (the nearest `.git` walked up from cwd, or the raw cwd if no git repo is found), then assigns each project a random color from a curated 12-slot palette for the current Hyper run. The plugin prefers palette slots that aren't already taken by other open projects, so the first 12 distinct projects you open in one Hyper session are guaranteed to get 12 distinct colors. Restart Hyper and colors reshuffle. Shells that emit OSC 7 retint live when you `cd` between projects.
|
|
6
|
+
|
|
7
|
+
The plugin paints, in the active project's color:
|
|
6
8
|
|
|
7
9
|
- a thin border around the window
|
|
8
10
|
- a colored top line in the tab bar
|
|
9
11
|
- a subtle gradient tint on the active tab's background
|
|
10
12
|
- an optional uppercase color-name label in the top-right corner (off by default; opt in with `showBadge: true`)
|
|
11
13
|
|
|
12
|
-
The
|
|
14
|
+
The color signal lives on the window, not on individual tabs. Inside a window with multiple tabs, switching to a tab in a different project retints the whole window; switching between same-project tabs leaves the color unchanged. If cwd resolution ever fails entirely, the plugin falls back to the session UID so the window still gets a color.
|
|
13
15
|
|
|
14
16
|
## Screenshots
|
|
15
17
|
|
|
@@ -104,12 +106,12 @@ Palette entries must include both a non-empty `name` and a 6- or 8-digit hex col
|
|
|
104
106
|
|
|
105
107
|
Color assignment is intentionally not permanent. The grouping rules are:
|
|
106
108
|
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
- After restarting Hyper,
|
|
109
|
+
- Sessions whose cwd resolves to the same project root (nearest `.git`, or the raw cwd if there's no repo) share a color for the current Hyper run.
|
|
110
|
+
- The window's visible color follows whichever tab is currently active. Switching active tab to a different project retints the window; switching to a same-project tab leaves it alone.
|
|
111
|
+
- After restarting Hyper, projects can receive different colors.
|
|
110
112
|
- If Hyper does not provide a cwd, the plugin falls back to the session UID.
|
|
111
113
|
|
|
112
|
-
Live
|
|
114
|
+
Live retinting after `cd` requires OSC 7 cwd reporting from the shell. Many modern prompts/shell integrations already emit it; if yours does not, the color is set when a tab is created and stays put until you switch active tabs or restart Hyper.
|
|
113
115
|
|
|
114
116
|
The plugin uses two custom Hyper RPC event names internally: `windowtint:session-seed` and `windowtint:cwd-change`. This depends on Hyper's current runtime RPC passthrough for arbitrary event names.
|
|
115
117
|
|
|
@@ -158,10 +160,11 @@ osc7_cwd
|
|
|
158
160
|
|
|
159
161
|
## Roadmap
|
|
160
162
|
|
|
161
|
-
1. **
|
|
162
|
-
2. **
|
|
163
|
-
3. **
|
|
164
|
-
4. **
|
|
163
|
+
1. **Per-tab outlines for inactive tabs.** Today the color signal is window-level (whichever tab is active). The original plan was to also outline each tab in the tab bar with its own project color, but Hyper 3.x's Tab component drops most plugin-injected props, so it would need a renderer-side DOM observer approach. Deferred until that's worth building.
|
|
164
|
+
2. **Optional color labels.** Expose the current in-memory project group color so helper scripts can find matching windows without making the assignment permanent.
|
|
165
|
+
3. **Admin/sudo override.** Force red for elevated shells (steal this from `hyperborder`'s `adminBorderColors`).
|
|
166
|
+
4. **OKLCH-spaced palette generator** for any N colors with guaranteed perceptual distinctness.
|
|
167
|
+
5. **Tests.** Pure-function tests for `hashToIndex`, `parseOsc7Cwd`, `readUserConfig`, and `withAlpha`.
|
|
165
168
|
|
|
166
169
|
## License
|
|
167
170
|
|
package/package.json
CHANGED