stardance has been extended another month! the new deadline is october 31 :)

You are browsing as a guest. Sign up (or log in) to start making projects!

1h 20m 43s logged

Implimented Visual Decay Decorations

I built the entire visual decay layer for Tab Rot over the past two days. Created tabDecorator.ts with three TextEditorDecorationTyp instances one for each decay stage. Stage 1 is a slight washout with opacity: 0.75 and a warm background tint. Stage 2 gets heavier with opacity: 0.55, a dashed brown border, and a darker background. Stage 3 is the nasty one — opacity: 0.4, solid border, wavy strikethrough, and a dark background that makes the code genuinely look abandoned.
The updateDecorations() method loops through all visibleTextEditors, grabs the decay stage from the tracker, clears any previous decorations (super important so they dont stack), and applies a full-document Range if the stage is above zero. I register all decoration types in context.subscriptions so VS Code cleans them up on deactivate.
I also registered custom theme colors in package.json under contributes.colors — background tints and overview ruler colors for all three stages, with separate defaults for dark, light, and high-contrast themes. Then I swapped out all the hardcoded rgba() values in the decorator for new vscode.ThemeColor(…) so user can customize the palette in their settings.json if they want.
Wired everything into extension.ts — updateDecorations() gets called after activation, after every onDidChangeActiveTextEditor (so visiting a tab instantly removes the rot), after onDidCloseTextDocument (cleanup), inside the 60-second interval (so decay progresses live), and on onDidChangeVisibleTextEditors (for split views).

0
30

Comments 0

No comments yet. Be the first!