Skip to content

Instantly share code, notes, and snippets.

@olafgeibig
Last active July 12, 2026 11:52
Show Gist options
  • Select an option

  • Save olafgeibig/aaaa737097f5fb24c880026d8b9b6464 to your computer and use it in GitHub Desktop.

Select an option

Save olafgeibig/aaaa737097f5fb24c880026d8b9b6464 to your computer and use it in GitHub Desktop.
Hermes dashboard patch.

Hermes Dashboard Patch

Based on the discussion in NousResearch/hermes-agent#18080

What it does

It patches the compiled CSS files. Therefore the patches are lost after hermes update

  • Dashboard uses fonts configured in the theme
  • Dashboard uses font size configured in the theme
  • Removes all upper case transformations

Install

Place it in ~/hermes/bin, make it executable chmod a+x ~/hermes/bin/patch-dashboard.sh and run it after each hermes update from the hermes home dir with ./bin/patch-dashboard.sh

#!/bin/bash
# Patch Hermes web_dist CSS: force theme font via !important + universal
# Patch v0.1.0
# Works with hermes 0.14.0
set -euo pipefail
# Pick the real compiled CSS (exclude accidental " copy.css" duplicates)
CSS_FILE=$(grep -rl 'html{font-family:var(--theme-font-sans)' "$HOME/.hermes/hermes-agent/hermes_cli/web_dist/assets"/index-*.css 2>/dev/null \
| grep -v ' copy\.css$' \
| head -n 1 || true)
if [ -z "${CSS_FILE:-}" ]; then
echo "❌ No matching CSS file found."
exit 1
fi
echo "📄 Patching: $CSS_FILE"
OLD_STR='html{font-family:var(--theme-font-sans);font-size:var(--theme-base-size);line-height:var(--theme-line-height);letter-spacing:var(--theme-letter-spacing);height:100dvh;max-height:100dvh;overflow:hidden}'
NEW_STR='html{font-family:var(--theme-font-sans) !important;}*{font-family:inherit !important}'
# Escape for sed
OLD_ESC=$(printf '%s\n' "$OLD_STR" | sed 's/[\/&]/\\&/g')
NEW_ESC=$(printf '%s\n' "$NEW_STR" | sed 's/[\/&]/\\&/g')
# macOS/BSD sed: -i requires an extension (use empty ext)
sed -i '' "s/$OLD_ESC/$NEW_ESC/" "$CSS_FILE"
# Neutralize accidental ALL CAPS styling in the web UI bundle
sed -i '' 's/\.uppercase{text-transform:uppercase}/\.uppercase{text-transform:none}/g' "$CSS_FILE"
# Theme base font size is not wired (CSS uses html{font-size:clamp(...)}). Force it.
sed -i '' 's/html{font-size:clamp(14px,.5vw + 7px,18px)}/html{font-size:var(--theme-base-size) !important}/g' "$CSS_FILE"
echo "✅ Patched: html{…} → forced font-family"
name: tomorrow
label: Tomorrow
description: Clean, readable light theme — Tomorrow palette with Lato + Ubuntu Sans
Mono
palette:
background: '#ffffff'
midground: '#000000'
foreground:
hex: '#ede5ff'
alpha: 0.29
warmGlow: rgba(66, 113, 174, 0.39)
noiseOpacity: 0.05
typography:
fontSans: '"Lato", system-ui, sans-serif'
fontMono: '"JetBrains Mono", ui-monospace, monospace'
fontDisplay: '"Lato", system-ui, sans-serif'
fontUrl: https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Ubuntu+Sans+Mono:ital,wght@0,400..700;1,400..700&family=Ubuntu+Sans:ital,wght@0,100..800;1,100..800&display=swap
baseSize: 18px
lineHeight: '1.60'
letterSpacing: normal
layout:
radius: 0.375rem
density: comfortable
layoutVariant: standard
colorOverrides:
destructive: '#ff6b6b'
ring: '#ff6b6b'
primary: '#ad5fec'
primaryForeground: '#000000'
accent: '#df071c'
card: '#ede5ff'
warning: '#d60000'
componentStyles:
card:
background: '#ffffff'
boxShadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.06)
header:
background: '#f8f8f8'
borderBottom: '1px solid #e0e0e0'
customCSS: "/* Tomorrow light — clean, no transform abuse */\nbody {\n -webkit-font-smoothing:\
\ antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-transform: none;\n\
\ font-variant: normal;\n}\nh1, h2, h3, h4, h5, h6 {\n text-transform: none;\n\
\ letter-spacing: normal;\n font-family: \"Lato\", \"Ubuntu Sans\", system-ui,\
\ sans-serif;\n}\ncode, pre, kbd, samp {\n text-transform: none;\n}\n/* Slightly\
\ tighter spacing than browser default */\np { margin-bottom: 0.75rem; }\n:root[data-theme=\"\
tomorrow\"] * { font-family: \"Lato\" !important; }"
# Tomorrow Night — dark dashboard theme
# Palette derived from Tomorrow Night (Chris Kempson)
# https://terminalcolors.com/themes/tomorrow/night/
name: tomorrow-night
label: "Tomorrow Night"
description: "Readable dark theme — Tomorrow Night palette with Lato + Ubuntu Sans Mono"
# ------- palette (3-layer) -------
palette:
background: "#1d1f21"
midground: "#c5c8c6"
foreground:
hex: "#ffffff"
alpha: 0
warmGlow: "rgba(129, 162, 190, 0.14)"
noiseOpacity: 0
# ------- typography -------
typography:
fontSans: '"Lato", system-ui, sans-serif'
fontMono: '"Ubuntu Sans Mono", ui-monospace, monospace'
fontDisplay: '"Lato", system-ui, sans-serif'
fontUrl: "https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Ubuntu+Sans+Mono:ital,wght@0,400..700;1,400..700&family=Ubuntu+Sans:ital,wght@0,100..800;1,100..800&display=swap"
baseSize: "18px"
lineHeight: "1.6"
letterSpacing: "normal"
# ------- layout -------
layout:
radius: "0.375rem"
density: "comfortable"
layoutVariant: standard
# ------- component chrome -------
componentStyles:
card:
background: "#282a2e"
boxShadow: "0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px -1px rgba(0, 0, 0, 0.2)"
header:
background: "#282a2e"
borderBottom: "1px solid #373b41"
# ------- color overrides -------
colorOverrides:
primary: "#81a2be"
primaryForeground: "#1d1f21"
accent: "#8abeb7"
accentForeground: "#1d1f21"
ring: "#81a2be"
success: "#b5bd68"
successForeground: "#1d1f21"
warning: "#f0c674"
warningForeground: "#1d1f21"
destructive: "#cc6666"
destructiveForeground: "#1d1f21"
border: "#373b41"
muted: "#969896"
mutedForeground: "#c5c8c6"
card: "#282a2e"
cardForeground: "#c5c8c6"
popover: "#282a2e"
popoverForeground: "#c5c8c6"
secondary: "#282a2e"
secondaryForeground: "#c5c8c6"
input: "#373b41"
# ------- customCSS -------
customCSS: |
/* Tomorrow Night — clean, no transform abuse */
body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-transform: none;
font-variant: normal;
}
h1, h2, h3, h4, h5, h6 {
text-transform: none;
letter-spacing: normal;
font-family: "Lato", "Ubuntu Sans", system-ui, sans-serif;
}
code, pre, kbd, samp {
text-transform: none;
}
p { margin-bottom: 0.75rem; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment