diff --git a/bin/omarchy-theme-set b/bin/omarchy-theme-set index a09cf59a..aa20d7b6 100755 --- a/bin/omarchy-theme-set +++ b/bin/omarchy-theme-set @@ -49,6 +49,7 @@ omarchy-theme-set-browser omarchy-theme-set-vscode omarchy-theme-set-cursor omarchy-theme-set-obsidian +omarchy-theme-set-opencode # Call hook on theme set omarchy-hook theme-set "$THEME_NAME" diff --git a/bin/omarchy-theme-set-opencode b/bin/omarchy-theme-set-opencode new file mode 100755 index 00000000..c9cc7dfc --- /dev/null +++ b/bin/omarchy-theme-set-opencode @@ -0,0 +1,9 @@ +#!/bin/bash + +OPENCODE_THEME="$HOME/.config/omarchy/current/theme/opencode.json" +OPENCODE_THEMES_DIR="$HOME/.config/opencode/themes" + +if [[ -f "$OPENCODE_THEME" ]]; then + mkdir -p "$OPENCODE_THEMES_DIR" + cp "$OPENCODE_THEME" "$OPENCODE_THEMES_DIR/omarchy.json" +fi diff --git a/themes/templates.d/opencode.json.tpl b/themes/templates.d/opencode.json.tpl new file mode 100644 index 00000000..927b8869 --- /dev/null +++ b/themes/templates.d/opencode.json.tpl @@ -0,0 +1,243 @@ +{ + "$schema": "https://opencode.ai/theme.json", + "defs": { + "darkStep1": "{{ background }}", + "darkStep2": "{{ background }}", + "darkStep3": "{{ background }}", + "darkStep4": "{{ background }}", + "darkStep5": "{{ color8 }}", + "darkStep6": "{{ color7 }}", + "darkStep7": "{{ color8 }}", + "darkStep8": "{{ color7 }}", + "darkStep9": "{{ color6 }}", + "darkStep10": "{{ color6 }}", + "darkStep11": "{{ color7 }}", + "darkStep12": "{{ foreground }}", + "darkRed": "{{ color11 }}", + "darkOrange": "{{ color3 }}", + "darkYellow": "{{ color3 }}", + "darkGreen": "{{ color10 }}", + "darkCyan": "{{ color12 }}", + "darkPurple": "{{ color5 }}", + "lightStep1": "{{ color15 }}", + "lightStep2": "{{ color15 }}", + "lightStep3": "{{ color15 }}", + "lightStep4": "{{ color15 }}", + "lightStep5": "{{ color7 }}", + "lightStep6": "{{ color8 }}", + "lightStep7": "{{ color7 }}", + "lightStep8": "{{ color8 }}", + "lightStep9": "{{ color6 }}", + "lightStep10": "{{ color6 }}", + "lightStep11": "{{ color8 }}", + "lightStep12": "{{ background }}", + "lightRed": "{{ color11 }}", + "lightOrange": "{{ color1 }}", + "lightYellow": "{{ color3 }}", + "lightGreen": "{{ color10 }}", + "lightCyan": "{{ color12 }}", + "lightPurple": "{{ color4 }}" + }, + "theme": { + "primary": { + "dark": "darkStep9", + "light": "lightStep9" + }, + "secondary": { + "dark": "darkPurple", + "light": "lightPurple" + }, + "accent": { + "dark": "darkOrange", + "light": "lightOrange" + }, + "error": { + "dark": "darkRed", + "light": "lightRed" + }, + "warning": { + "dark": "darkOrange", + "light": "lightOrange" + }, + "success": { + "dark": "darkGreen", + "light": "lightGreen" + }, + "info": { + "dark": "darkStep9", + "light": "lightStep9" + }, + "text": { + "dark": "darkStep12", + "light": "lightStep12" + }, + "textMuted": { + "dark": "darkStep11", + "light": "lightStep11" + }, + "background": { + "dark": "darkStep1", + "light": "lightStep1" + }, + "backgroundPanel": { + "dark": "darkStep2", + "light": "lightStep2" + }, + "backgroundElement": { + "dark": "darkStep3", + "light": "lightStep3" + }, + "border": { + "dark": "darkStep7", + "light": "lightStep7" + }, + "borderActive": { + "dark": "darkStep8", + "light": "lightStep8" + }, + "borderSubtle": { + "dark": "darkStep6", + "light": "lightStep6" + }, + "diffAdded": { + "dark": "#4fd6be", + "light": "#1e725c" + }, + "diffRemoved": { + "dark": "#c53b53", + "light": "#c53b53" + }, + "diffContext": { + "dark": "#828bb8", + "light": "#7086b5" + }, + "diffHunkHeader": { + "dark": "#828bb8", + "light": "#7086b5" + }, + "diffHighlightAdded": { + "dark": "#b8db87", + "light": "#4db380" + }, + "diffHighlightRemoved": { + "dark": "#e26a75", + "light": "#f52a65" + }, + "diffAddedBg": { + "dark": "#20303b", + "light": "#d5e5d5" + }, + "diffRemovedBg": { + "dark": "#37222c", + "light": "#f7d8db" + }, + "diffContextBg": { + "dark": "darkStep2", + "light": "lightStep2" + }, + "diffLineNumber": { + "dark": "darkStep3", + "light": "lightStep3" + }, + "diffAddedLineNumberBg": { + "dark": "#1b2b34", + "light": "#c5d5c5" + }, + "diffRemovedLineNumberBg": { + "dark": "#2d1f26", + "light": "#e7c8cb" + }, + "markdownText": { + "dark": "darkStep12", + "light": "lightStep12" + }, + "markdownHeading": { + "dark": "darkPurple", + "light": "lightPurple" + }, + "markdownLink": { + "dark": "darkStep9", + "light": "lightStep9" + }, + "markdownLinkText": { + "dark": "darkCyan", + "light": "lightCyan" + }, + "markdownCode": { + "dark": "darkGreen", + "light": "lightGreen" + }, + "markdownBlockQuote": { + "dark": "darkYellow", + "light": "lightYellow" + }, + "markdownEmph": { + "dark": "darkYellow", + "light": "lightYellow" + }, + "markdownStrong": { + "dark": "darkOrange", + "light": "lightOrange" + }, + "markdownHorizontalRule": { + "dark": "darkStep11", + "light": "lightStep11" + }, + "markdownListItem": { + "dark": "darkStep9", + "light": "lightStep9" + }, + "markdownListEnumeration": { + "dark": "darkCyan", + "light": "lightCyan" + }, + "markdownImage": { + "dark": "darkStep9", + "light": "lightStep9" + }, + "markdownImageText": { + "dark": "darkCyan", + "light": "lightCyan" + }, + "markdownCodeBlock": { + "dark": "darkStep12", + "light": "lightStep12" + }, + "syntaxComment": { + "dark": "darkStep11", + "light": "lightStep11" + }, + "syntaxKeyword": { + "dark": "darkPurple", + "light": "lightPurple" + }, + "syntaxFunction": { + "dark": "darkStep9", + "light": "lightStep9" + }, + "syntaxVariable": { + "dark": "darkRed", + "light": "lightRed" + }, + "syntaxString": { + "dark": "darkGreen", + "light": "lightGreen" + }, + "syntaxNumber": { + "dark": "darkOrange", + "light": "lightOrange" + }, + "syntaxType": { + "dark": "darkYellow", + "light": "lightYellow" + }, + "syntaxOperator": { + "dark": "darkCyan", + "light": "lightCyan" + }, + "syntaxPunctuation": { + "dark": "darkStep12", + "light": "lightStep12" + } + } +}