aboutsummaryrefslogtreecommitdiffstats
path: root/templates/sublime/udt.sublime-color-scheme.in
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-15 11:16:09 +0200
committerDanilo M. <danix@danix.xyz>2026-09-15 11:16:09 +0200
commita9f3e65355b64577044467ca70ca16d00fba016b (patch)
treee23ba75ade9be67f194a6535d351f6a8fd9909ae /templates/sublime/udt.sublime-color-scheme.in
parentc90c72ed7d5bb5337319a053bf89d73fcb16c604 (diff)
downloadunified-desktop-theme-a9f3e65355b64577044467ca70ca16d00fba016b.tar.gz
unified-desktop-theme-a9f3e65355b64577044467ca70ca16d00fba016b.zip
feat(palette): add Sublime Text as a consumer
Two outputs, not one. The colour scheme themes the editor pane and tracks the wallpaper accent; the theme themes the UI chrome and sits on the scheme's fixed accent, because Sublime reads a theme once per window and a moving accent would leave open windows disagreeing with new ones. The colour scheme costs no new roles. Its scopes map onto the sixteen ANSI slots every scheme already declares, so all nine satisfy it and the identical-role-set selftest passes untouched. The theme is an override layered over Material Behave rather than a theme of its own: that theme hardcodes 419 rules of [r,g,b] literals with no variables, so the chrome surfaces are restated and its geometry, icons and animations are inherited. It installs under the name of the theme it overrides, because Sublime merges .sublime-theme files by filename with Packages/User last; under its own name it would never apply. It also has to follow Material Behave's material_theme_contrast_mode block and carry no settings gate, or contrast mode wins. The accent is replaced by matching the variable's current value rather than a placeholder: install.sh copies the file out of the repo, so after the first wallpaper change there is no placeholder left to substitute. udt-accent --selftest now covers that it stays idempotent. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'templates/sublime/udt.sublime-color-scheme.in')
-rw-r--r--templates/sublime/udt.sublime-color-scheme.in247
1 files changed, 247 insertions, 0 deletions
diff --git a/templates/sublime/udt.sublime-color-scheme.in b/templates/sublime/udt.sublime-color-scheme.in
new file mode 100644
index 0000000..30eed18
--- /dev/null
+++ b/templates/sublime/udt.sublime-color-scheme.in
@@ -0,0 +1,247 @@
+// Generated by udt-palette from palette/@SCHEME@.conf. Do not edit.
+//
+// A Sublime Text color scheme is JSON with comments. Colour scopes map onto the
+// terminal roles rather than onto syntax-specific roles of their own: a scheme
+// already declares all sixteen ANSI slots, so a syntax theme costs no new roles
+// and every shipped scheme satisfies it without editing nine role maps.
+//
+// @ACCENT@ is left for udt-accent, which substitutes it per wallpaper and
+// rewrites this file in place. Sublime watches Packages/User and reloads a
+// colour scheme when its file changes, so that reaches a running editor.
+{
+ "name": "UDT",
+ "author": "udt-palette (@SCHEME@)",
+ "variables":
+ {
+ "bg": "@BG@",
+ "bg_alt": "@BG_ALT@",
+ "bg_deep": "@BG_DEEP@",
+ "surface": "@SURFACE@",
+ "surface_alt": "@SURFACE_ALT@",
+
+ "fg": "@FG@",
+ "fg_dim": "@FG_DIM@",
+ "fg_faint": "@FG_FAINT@",
+
+ "accent": "@ACCENT@",
+
+ "red": "@RED@",
+ "green": "@GREEN@",
+ "yellow": "@YELLOW@",
+ "blue": "@BLUE@",
+ "magenta": "@MAGENTA@",
+ "cyan": "@CYAN@",
+
+ "critical": "@CRITICAL@",
+ "warning": "@WARNING@",
+ "success": "@SUCCESS@",
+ "info": "@INFO@"
+ },
+ "globals":
+ {
+ "background": "var(bg)",
+ "foreground": "var(fg)",
+ "caret": "var(accent)",
+ "block_caret": "var(accent)",
+ "invisibles": "var(fg_faint)",
+ "line_highlight": "var(surface)",
+ "selection": "@SELECTION_BG@",
+ "selection_border": "var(accent)",
+ "inactive_selection": "var(surface)",
+ "misspelling": "var(critical)",
+ "gutter": "var(bg)",
+ "gutter_foreground": "var(fg_faint)",
+ "guide": "var(surface)",
+ "active_guide": "var(accent)",
+ "stack_guide": "var(surface_alt)",
+ "find_highlight": "var(warning)",
+ "find_highlight_foreground": "var(bg)",
+ "shadow": "var(bg_deep)"
+ },
+ "rules":
+ [
+ {
+ "name": "Comment",
+ "scope": "comment, punctuation.definition.comment",
+ "foreground": "var(fg_faint)",
+ "font_style": "italic"
+ },
+ {
+ "name": "String",
+ "scope": "string, constant.other.symbol",
+ "foreground": "var(green)"
+ },
+ {
+ "name": "Escape sequence",
+ "scope": "constant.character.escape, constant.other.placeholder",
+ "foreground": "var(magenta)"
+ },
+ {
+ "name": "Number",
+ "scope": "constant.numeric",
+ "foreground": "var(yellow)"
+ },
+ {
+ "name": "Built-in constant",
+ "scope": "constant.language",
+ "foreground": "var(yellow)"
+ },
+ {
+ "name": "User-defined constant",
+ "scope": "constant.character, constant.other",
+ "foreground": "var(yellow)"
+ },
+ {
+ "name": "Variable",
+ "scope": "variable",
+ "foreground": "var(fg)"
+ },
+ {
+ "name": "Member",
+ "scope": "variable.other.member, meta.property variable",
+ "foreground": "var(cyan)"
+ },
+ {
+ "name": "Language variable",
+ "scope": "variable.language",
+ "foreground": "var(magenta)",
+ "font_style": "italic"
+ },
+ {
+ "name": "Keyword",
+ "scope": "keyword, keyword.operator.word",
+ "foreground": "var(magenta)"
+ },
+ {
+ "name": "Operator",
+ "scope": "keyword.operator",
+ "foreground": "var(cyan)"
+ },
+ {
+ "name": "Storage",
+ "scope": "storage, storage.modifier",
+ "foreground": "var(magenta)"
+ },
+ {
+ "name": "Storage type",
+ "scope": "storage.type",
+ "foreground": "var(blue)",
+ "font_style": "italic"
+ },
+ {
+ "name": "Class name",
+ "scope": "entity.name.class, entity.name.struct, entity.name.type",
+ "foreground": "var(yellow)",
+ "font_style": "italic"
+ },
+ {
+ "name": "Inherited class",
+ "scope": "entity.other.inherited-class",
+ "foreground": "var(yellow)",
+ "font_style": "italic"
+ },
+ {
+ "name": "Function name",
+ "scope": "entity.name.function, variable.function",
+ "foreground": "var(blue)"
+ },
+ {
+ "name": "Function argument",
+ "scope": "variable.parameter",
+ "foreground": "var(accent)",
+ "font_style": "italic"
+ },
+ {
+ "name": "Section or namespace",
+ "scope": "entity.name.namespace, entity.name.section",
+ "foreground": "var(accent)"
+ },
+ {
+ "name": "Tag name",
+ "scope": "entity.name.tag",
+ "foreground": "var(magenta)"
+ },
+ {
+ "name": "Tag attribute",
+ "scope": "entity.other.attribute-name",
+ "foreground": "var(yellow)",
+ "font_style": "italic"
+ },
+ {
+ "name": "Library function",
+ "scope": "support.function",
+ "foreground": "var(cyan)"
+ },
+ {
+ "name": "Library constant",
+ "scope": "support.constant",
+ "foreground": "var(yellow)"
+ },
+ {
+ "name": "Library class/type",
+ "scope": "support.class, support.type, support.other.namespace",
+ "foreground": "var(yellow)",
+ "font_style": "italic"
+ },
+ {
+ "name": "Punctuation",
+ "scope": "punctuation, meta.brace, meta.delimiter",
+ "foreground": "var(fg_dim)"
+ },
+ {
+ "name": "Invalid",
+ "scope": "invalid",
+ "foreground": "var(bg)",
+ "background": "var(critical)"
+ },
+ {
+ "name": "Invalid deprecated",
+ "scope": "invalid.deprecated",
+ "foreground": "var(bg)",
+ "background": "var(warning)"
+ },
+ {
+ "name": "Markup heading",
+ "scope": "markup.heading, entity.name.section",
+ "foreground": "var(accent)",
+ "font_style": "bold"
+ },
+ {
+ "name": "Markup link",
+ "scope": "markup.underline.link, string.other.link",
+ "foreground": "var(info)",
+ "font_style": "underline"
+ },
+ {
+ "name": "Markup bold",
+ "scope": "markup.bold",
+ "font_style": "bold"
+ },
+ {
+ "name": "Markup italic",
+ "scope": "markup.italic",
+ "font_style": "italic"
+ },
+ {
+ "name": "Markup raw",
+ "scope": "markup.raw, markup.inline.raw",
+ "foreground": "var(warning)",
+ "background": "var(bg_alt)"
+ },
+ {
+ "name": "Diff inserted",
+ "scope": "markup.inserted",
+ "foreground": "var(success)"
+ },
+ {
+ "name": "Diff deleted",
+ "scope": "markup.deleted",
+ "foreground": "var(critical)"
+ },
+ {
+ "name": "Diff changed",
+ "scope": "markup.changed",
+ "foreground": "var(warning)"
+ }
+ ]
+}