hueman-cli 0.2.0__py3-none-any.whl

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.
Files changed (78) hide show
  1. hueman/__init__.py +11 -0
  2. hueman/__main__.py +3 -0
  3. hueman/cli.py +353 -0
  4. hueman/data/hueman.config.example.yaml +111 -0
  5. hueman/engine/__init__.py +0 -0
  6. hueman/engine/colors.py +30 -0
  7. hueman/engine/config.py +186 -0
  8. hueman/engine/fsutil.py +41 -0
  9. hueman/engine/palettes.py +66 -0
  10. hueman/engine/reload.py +60 -0
  11. hueman/engine/render.py +243 -0
  12. hueman/engine/statesource.py +370 -0
  13. hueman/engine/targets.py +95 -0
  14. hueman/palettes/arctic-ice.yaml +102 -0
  15. hueman/palettes/autumn.yaml +102 -0
  16. hueman/palettes/catppuccin-latte.yaml +102 -0
  17. hueman/palettes/catppuccin-mocha.yaml +102 -0
  18. hueman/palettes/copperwave.yaml +103 -0
  19. hueman/palettes/crimson-vivid.yaml +111 -0
  20. hueman/palettes/dracula.yaml +102 -0
  21. hueman/palettes/ember-red.yaml +111 -0
  22. hueman/palettes/everforest-dark.yaml +102 -0
  23. hueman/palettes/galaxy.yaml +102 -0
  24. hueman/palettes/gruvbox-light.yaml +102 -0
  25. hueman/palettes/gruvbox.yaml +102 -0
  26. hueman/palettes/kanagawa-dragon.yaml +102 -0
  27. hueman/palettes/matrix.yaml +102 -0
  28. hueman/palettes/mono-contrast.yaml +102 -0
  29. hueman/palettes/nord.yaml +102 -0
  30. hueman/palettes/ocean-deep.yaml +102 -0
  31. hueman/palettes/one-light.yaml +102 -0
  32. hueman/palettes/onyx-gold.yaml +103 -0
  33. hueman/palettes/rose-pine-dawn.yaml +102 -0
  34. hueman/palettes/solarized-light.yaml +102 -0
  35. hueman/palettes/synthwave.yaml +102 -0
  36. hueman/palettes/tokyonight.yaml +106 -0
  37. hueman/palettes/tuxedo.yaml +103 -0
  38. hueman/palettes/vaporwave.yaml +102 -0
  39. hueman/resources.py +18 -0
  40. hueman/templates/atuin_theme.toml.j2 +19 -0
  41. hueman/templates/bottom_theme.toml.j2 +43 -0
  42. hueman/templates/bspwm_colors.conf.j2 +5 -0
  43. hueman/templates/claude_statusline.sh.j2 +216 -0
  44. hueman/templates/dunst_colors.conf.j2 +15 -0
  45. hueman/templates/fzf_opts.j2 +9 -0
  46. hueman/templates/fzf_theme.j2 +17 -0
  47. hueman/templates/herdr_theme_custom.toml.j2 +11 -0
  48. hueman/templates/k9s_theme.yaml.j2 +83 -0
  49. hueman/templates/kitty.conf.j2 +51 -0
  50. hueman/templates/lazydocker_theme.yml.j2 +19 -0
  51. hueman/templates/leaf_theme.toml.j2 +89 -0
  52. hueman/templates/newt_colors.j2 +32 -0
  53. hueman/templates/nvim_nightfox_theme.lua.j2 +70 -0
  54. hueman/templates/omp.omp.json.j2 +107 -0
  55. hueman/templates/opencode_theme.json.j2 +71 -0
  56. hueman/templates/pi_theme.json.j2 +65 -0
  57. hueman/templates/polybar_colors.ini.j2 +11 -0
  58. hueman/templates/posting_theme.yaml.j2 +47 -0
  59. hueman/templates/qutebrowser_github.user.js.j2 +121 -0
  60. hueman/templates/qutebrowser_google.user.js.j2 +132 -0
  61. hueman/templates/qutebrowser_hteam.user.js.j2 +962 -0
  62. hueman/templates/qutebrowser_theme.py.j2 +78 -0
  63. hueman/templates/rofi_theme.rasi.j2 +132 -0
  64. hueman/templates/sshub_theme.toml.j2 +49 -0
  65. hueman/templates/starship_block.toml.j2 +11 -0
  66. hueman/templates/termux_colors.properties.j2 +20 -0
  67. hueman/templates/tmux.conf.j2 +33 -0
  68. hueman/templates/tuicr_theme.toml.j2 +51 -0
  69. hueman/templates/wezterm_colors.lua.j2 +14 -0
  70. hueman/templates/windhawk_taskbar.json.j2 +4 -0
  71. hueman/templates/yazi_theme.toml.j2 +130 -0
  72. hueman/templates/zen_theme.json.j2 +11 -0
  73. hueman_cli-0.2.0.dist-info/METADATA +119 -0
  74. hueman_cli-0.2.0.dist-info/RECORD +78 -0
  75. hueman_cli-0.2.0.dist-info/WHEEL +5 -0
  76. hueman_cli-0.2.0.dist-info/entry_points.txt +2 -0
  77. hueman_cli-0.2.0.dist-info/licenses/LICENSE +21 -0
  78. hueman_cli-0.2.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,107 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
3
+ "blocks": [
4
+ {
5
+ "alignment": "left",
6
+ "segments": [
7
+ {
8
+ "foreground": "[[ session_fg ]]",
9
+ "style": "plain",
10
+ "template": "<[[ separator_fg ]]>┌─[</>{{ .UserName }}<[[ separator_fg ]]>]</>",
11
+ "type": "session"
12
+ },
13
+ {
14
+ "foreground": "[[ git_fg ]]",
15
+ "options": {
16
+ "fetch_status": true,
17
+ "fetch_upstream_icon": true
18
+ },
19
+ "style": "plain",
20
+ "template": "<[[ separator_fg ]]>──[</>{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}<[[ git_working_fg ]]> ●</>{{ end }}{{ if .Staging.Changed }}<[[ git_staging_fg ]]> ●</>{{ end }}<[[ separator_fg ]]>]</>",
21
+ "type": "git"
22
+ },
23
+ {
24
+ "foreground": "[[ aws_fg ]]",
25
+ "style": "plain",
26
+ "template": "<[[ separator_fg ]]>──[</>{{.Profile}}{{if .Region}}@{{.Region}}{{end}}<[[ separator_fg ]]>]</>",
27
+ "type": "aws"
28
+ },
29
+ {
30
+ "foreground": "[[ kubectl_fg ]]",
31
+ "style": "plain",
32
+ "template": "<[[ separator_fg ]]>──[</>{{.Context}}{{if .Namespace}}::{{.Namespace}}{{end}}<[[ separator_fg ]]>]</>",
33
+ "type": "kubectl"
34
+ },
35
+ {
36
+ "foreground": "[[ root_fg ]]",
37
+ "style": "plain",
38
+ "template": "<[[ separator_fg ]]>──[</>#<[[ separator_fg ]]>]</>",
39
+ "type": "root"
40
+ },
41
+ {
42
+ "foreground": "[[ battery_fg ]]",
43
+ "style": "plain",
44
+ "template": "{{ if not .Error }}<[[ separator_fg ]]>──[</>{{ .Icon }} {{ .Percentage }}%<[[ separator_fg ]]>]</>{{ end }}",
45
+ "type": "battery"
46
+ },
47
+ {
48
+ "foreground": "[[ status_fg ]]",
49
+ "style": "plain",
50
+ "template": "{{ if gt .Code 0 }}<[[ separator_fg ]]>──[</>✗ {{ reason .Code }}<[[ separator_fg ]]>]</>{{ end }}",
51
+ "type": "status"
52
+ }
53
+ ],
54
+ "type": "prompt"
55
+ },
56
+ {
57
+ "alignment": "left",
58
+ "newline": true,
59
+ "segments": [
60
+ {
61
+ "foreground": "[[ path_fg ]]",
62
+ "options": {
63
+ "style": "full"
64
+ },
65
+ "style": "plain",
66
+ "template": "<[[ separator_fg ]]>└─[</>{{ .Path }}<[[ separator_fg ]]>]</>",
67
+ "type": "path"
68
+ },
69
+ {
70
+ "type": "text",
71
+ "style": "plain",
72
+ "foreground": "[[ ticket_fg ]]",
73
+ "template": "{{ if .Env.LAST_TICKET }}<[[ separator_fg ]]>──[</>T {{ .Env.LAST_TICKET }}<[[ separator_fg ]]>]</>{{ end }}"
74
+ }
75
+ ],
76
+ "type": "prompt"
77
+ },
78
+ {
79
+ "alignment": "left",
80
+ "newline": false,
81
+ "segments": [
82
+ {
83
+ "foreground": "[[ venv_fg ]]",
84
+ "style": "plain",
85
+ "template": "{{ if .Venv }} ({{ .Venv }}) {{ end }}",
86
+ "type": "python"
87
+ }
88
+ ],
89
+ "type": "prompt"
90
+ },
91
+ {
92
+ "alignment": "left",
93
+ "newline": true,
94
+ "segments": [
95
+ {
96
+ "foreground": "[[ prompt_char_fg ]]",
97
+ "style": "plain",
98
+ "template": " ❯ ",
99
+ "type": "text"
100
+ }
101
+ ],
102
+ "type": "prompt"
103
+ }
104
+ ],
105
+ "final_space": true,
106
+ "version": 4
107
+ }
@@ -0,0 +1,71 @@
1
+ {
2
+ "$schema": "https://opencode.ai/theme.json",
3
+ "defs": {
4
+ "text": "{{ foreground }}",
5
+ "textMuted": "{{ muted }}",
6
+ "background": "{{ background }}",
7
+ "backgroundPanel": "{{ background_alt }}",
8
+ "border": "{{ inactive_border_color }}",
9
+ "borderActive": "{{ active_border_color }}",
10
+ "primary": "{{ primary }}",
11
+ "secondary": "{{ secondary }}",
12
+ "accent": "{{ color5 }}",
13
+ "error": "{{ alert }}",
14
+ "warning": "{{ warning }}",
15
+ "success": "{{ success }}",
16
+ "info": "{{ color4 }}",
17
+ "numberAccent": "{{ color13 }}"
18
+ },
19
+ "theme": {
20
+ "primary": "primary",
21
+ "secondary": "secondary",
22
+ "accent": "accent",
23
+ "error": "error",
24
+ "warning": "warning",
25
+ "success": "success",
26
+ "info": "info",
27
+ "text": "text",
28
+ "textMuted": "textMuted",
29
+ "background": "background",
30
+ "backgroundPanel": "backgroundPanel",
31
+ "backgroundElement": "backgroundPanel",
32
+ "border": "border",
33
+ "borderActive": "borderActive",
34
+ "borderSubtle": "border",
35
+ "diffAdded": "success",
36
+ "diffRemoved": "error",
37
+ "diffContext": "textMuted",
38
+ "diffHunkHeader": "textMuted",
39
+ "diffHighlightAdded": "success",
40
+ "diffHighlightRemoved": "error",
41
+ "diffAddedBg": "backgroundPanel",
42
+ "diffRemovedBg": "backgroundPanel",
43
+ "diffContextBg": "backgroundPanel",
44
+ "diffLineNumber": "textMuted",
45
+ "diffAddedLineNumberBg": "backgroundPanel",
46
+ "diffRemovedLineNumberBg": "backgroundPanel",
47
+ "markdownText": "text",
48
+ "markdownHeading": "primary",
49
+ "markdownLink": "secondary",
50
+ "markdownLinkText": "accent",
51
+ "markdownCode": "success",
52
+ "markdownBlockQuote": "textMuted",
53
+ "markdownEmph": "warning",
54
+ "markdownStrong": "primary",
55
+ "markdownHorizontalRule": "textMuted",
56
+ "markdownListItem": "primary",
57
+ "markdownListEnumeration": "accent",
58
+ "markdownImage": "secondary",
59
+ "markdownImageText": "accent",
60
+ "markdownCodeBlock": "text",
61
+ "syntaxComment": "textMuted",
62
+ "syntaxKeyword": "secondary",
63
+ "syntaxFunction": "primary",
64
+ "syntaxVariable": "accent",
65
+ "syntaxString": "success",
66
+ "syntaxNumber": "numberAccent",
67
+ "syntaxType": "accent",
68
+ "syntaxOperator": "secondary",
69
+ "syntaxPunctuation": "text"
70
+ }
71
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/earendil-works/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
3
+ "name": "{{ theme_name }}",
4
+ "vars": {{ vars | tojson(indent=2) }},
5
+ "colors": {
6
+ "accent": "orange",
7
+ "border": "floatingBg",
8
+ "borderAccent": "orange",
9
+ "borderMuted": "elevatedBg",
10
+ "success": "green",
11
+ "error": "redEarth",
12
+ "warning": "sand",
13
+ "muted": "textMuted",
14
+ "dim": "dimGray",
15
+ "text": "",
16
+ "thinkingText": "thinkingColor",
17
+
18
+ "selectedBg": "floatingBg",
19
+ "userMessageBg": "elevatedBg",
20
+ "userMessageText": "textPrimary",
21
+ "customMessageBg": "elevatedBg",
22
+ "customMessageText": "textPrimary",
23
+ "customMessageLabel": "orange",
24
+
25
+ "toolPendingBg": "baseBg",
26
+ "toolSuccessBg": "#1f301f",
27
+ "toolErrorBg": "#2a1e1e",
28
+ "toolTitle": "orange",
29
+ "toolOutput": "textPrimary",
30
+
31
+ "mdHeading": "orange",
32
+ "mdLink": "sand",
33
+ "mdLinkUrl": "textMuted",
34
+ "mdCode": "orange",
35
+ "mdCodeBlock": "textPrimary",
36
+ "mdCodeBlockBorder": "floatingBg",
37
+ "mdQuote": "textSecondary",
38
+ "mdQuoteBorder": "green",
39
+ "mdHr": "textMuted",
40
+ "mdListBullet": "orange",
41
+
42
+ "toolDiffAdded": "green",
43
+ "toolDiffRemoved": "redEarth",
44
+ "toolDiffContext": "textMuted",
45
+
46
+ "syntaxComment": "textMuted",
47
+ "syntaxKeyword": "orange",
48
+ "syntaxFunction": "sand",
49
+ "syntaxVariable": "textSecondary",
50
+ "syntaxString": "green",
51
+ "syntaxNumber": "sand",
52
+ "syntaxType": "brown",
53
+ "syntaxOperator": "orange",
54
+ "syntaxPunctuation": "textMuted",
55
+
56
+ "thinkingOff": "textMuted",
57
+ "thinkingMinimal": "sand",
58
+ "thinkingLow": "brown",
59
+ "thinkingMedium": "orange",
60
+ "thinkingHigh": "redEarth",
61
+ "thinkingXhigh": "#ff3b3b",
62
+
63
+ "bashMode": "green"
64
+ }
65
+ }
@@ -0,0 +1,11 @@
1
+ ; Generado por hueman — no editar a mano, se sobreescribe en cada `hueman set`.
2
+ [colors]
3
+ background = {{ background }}
4
+ background-alt = {{ background_alt }}
5
+ foreground = {{ foreground }}
6
+ primary = {{ primary }}
7
+ secondary = {{ secondary }}
8
+ alert = {{ alert }}
9
+ success = {{ success }}
10
+ warning = {{ warning }}
11
+ muted = {{ muted }}
@@ -0,0 +1,47 @@
1
+ # Generado por hueman — no editar a mano, se sobreescribe en cada `hueman set`.
2
+ name: current
3
+ primary: "{{ primary }}"
4
+ secondary: "{{ secondary }}"
5
+ accent: "{{ primary }}"
6
+ background: "{{ background }}"
7
+ surface: "{{ background_alt }}"
8
+ panel: "{{ panel }}"
9
+ error: "{{ alert }}"
10
+ success: "{{ success }}"
11
+ warning: "{{ warning }}"
12
+ dark: {{ background | is_dark | lower }}
13
+
14
+ text_area:
15
+ cursor: "reverse"
16
+ cursor_line: "underline"
17
+ cursor_line_gutter: "bold {{ foreground }}"
18
+ selection: "reverse"
19
+ gutter: "{{ muted }}"
20
+ matched_bracket: "{{ background }} on {{ success }}"
21
+ url:
22
+ base: "italic {{ primary }}"
23
+ protocol: "bold {{ secondary }}"
24
+ separator: "dim {{ muted }}"
25
+ syntax:
26
+ json_key: "italic {{ primary }}"
27
+ json_number: "{{ secondary }}"
28
+ json_string: "{{ success }}"
29
+ json_boolean: "{{ success }}"
30
+ json_null: "underline {{ muted }}"
31
+
32
+ variable:
33
+ resolved: "{{ success }}"
34
+ unresolved: "{{ alert }}"
35
+
36
+ method:
37
+ get: "underline {{ success }}"
38
+ post: "italic {{ primary }}"
39
+ put: "bold {{ warning }}"
40
+ delete: "strikethrough {{ alert }}"
41
+ patch: "italic {{ secondary }}"
42
+ options: "dim {{ muted }}"
43
+ head: "underline {{ muted }}"
44
+
45
+ author: NeanderTech
46
+ description: "Tema generado por hueman desde la paleta {{ theme_name }}"
47
+ homepage: https://github.com/4drian0rtiz
@@ -0,0 +1,121 @@
1
+ // ==UserScript==
2
+ // @name GitHub theme
3
+ // @description Generated by hueman from the active palette. Do not edit by hand.
4
+ // @match *://github.com/*
5
+ // @match *://*.github.com/*
6
+ // @run-at document-start
7
+ // ==/UserScript==
8
+
9
+ (function () {
10
+ const CSS = `
11
+ /* Primer dark-mode tokens reassigned to the active theme palette. */
12
+ html,
13
+ [data-color-mode] {
14
+ color-scheme: dark !important;
15
+
16
+ /* Surfaces */
17
+ --bgColor-default: {{ background }} !important;
18
+ --bgColor-muted: {{ background_alt }} !important;
19
+ --bgColor-inset: {{ background }} !important;
20
+ --bgColor-emphasis: {{ muted }} !important;
21
+ --bgColor-neutral-muted: {{ background_alt }} !important;
22
+ --bgColor-neutral-emphasis: {{ muted }} !important;
23
+ --bgColor-accent-muted: {{ primary }}26 !important;
24
+ --bgColor-accent-emphasis: {{ primary }} !important;
25
+ --bgColor-success-muted: {{ success }}26 !important;
26
+ --bgColor-success-emphasis: {{ success }} !important;
27
+ --bgColor-open-muted: {{ success }}26 !important;
28
+ --bgColor-open-emphasis: {{ success }} !important;
29
+ --bgColor-danger-muted: {{ alert }}26 !important;
30
+ --bgColor-danger-emphasis: {{ alert }} !important;
31
+ --bgColor-closed-muted: {{ alert }}26 !important;
32
+ --bgColor-closed-emphasis: {{ alert }} !important;
33
+ --bgColor-attention-muted: {{ warning }}26 !important;
34
+ --bgColor-attention-emphasis: {{ warning }} !important;
35
+ --overlay-bgColor: {{ background_alt }} !important;
36
+
37
+ /* Text */
38
+ --fgColor-default: {{ foreground }} !important;
39
+ --fgColor-muted: {{ muted }} !important;
40
+ --fgColor-accent: {{ primary }} !important;
41
+ --fgColor-link: {{ primary }} !important;
42
+ --fgColor-success: {{ success }} !important;
43
+ --fgColor-open: {{ success }} !important;
44
+ --fgColor-danger: {{ alert }} !important;
45
+ --fgColor-closed: {{ alert }} !important;
46
+ --fgColor-attention: {{ warning }} !important;
47
+ --fgColor-onEmphasis: {{ background }} !important;
48
+
49
+ /* Borders */
50
+ --borderColor-default: {{ muted }} !important;
51
+ --borderColor-muted: {{ muted }}80 !important;
52
+ --borderColor-emphasis: {{ muted }} !important;
53
+ --borderColor-neutral-muted: {{ muted }}80 !important;
54
+ --borderColor-accent-muted: {{ primary }}66 !important;
55
+ --borderColor-accent-emphasis: {{ primary }} !important;
56
+ --borderColor-success-muted: {{ success }}66 !important;
57
+ --borderColor-success-emphasis: {{ success }} !important;
58
+ --borderColor-danger-muted: {{ alert }}66 !important;
59
+ --borderColor-danger-emphasis: {{ alert }} !important;
60
+ --borderColor-attention-muted: {{ warning }}66 !important;
61
+ --borderColor-attention-emphasis: {{ warning }} !important;
62
+
63
+ /* Header */
64
+ --header-bgColor: {{ background_alt }} !important;
65
+ --header-fgColor-default: {{ foreground }} !important;
66
+ --header-fgColor-logo: {{ primary }} !important;
67
+ --header-borderColor-divider: {{ muted }} !important;
68
+
69
+ /* Buttons */
70
+ --button-default-bgColor-rest: {{ background_alt }} !important;
71
+ --button-default-bgColor-hover: {{ background }} !important;
72
+ --button-default-borderColor-rest: {{ muted }} !important;
73
+ --button-default-fgColor-rest: {{ foreground }} !important;
74
+ --button-primary-bgColor-rest: {{ primary }} !important;
75
+ --button-primary-bgColor-hover: {{ primary }}d9 !important;
76
+ --button-primary-bgColor-active: {{ primary }}bf !important;
77
+ --button-primary-borderColor-rest: {{ primary }} !important;
78
+ --button-primary-fgColor-rest: {{ background }} !important;
79
+
80
+ /* Focus and selection */
81
+ --focus-outlineColor: {{ primary }} !important;
82
+ --selection-bgColor: {{ primary }}59 !important;
83
+
84
+ /* Legacy tokens still referenced by some surfaces */
85
+ --color-canvas-default: {{ background }} !important;
86
+ --color-canvas-subtle: {{ background_alt }} !important;
87
+ --color-canvas-inset: {{ background }} !important;
88
+ --color-fg-default: {{ foreground }} !important;
89
+ --color-fg-muted: {{ muted }} !important;
90
+ --color-fg-subtle: {{ muted }} !important;
91
+ --color-fg-on-emphasis: {{ background }} !important;
92
+ --color-border-default: {{ muted }} !important;
93
+ --color-border-muted: {{ muted }}80 !important;
94
+ --color-accent-fg: {{ primary }} !important;
95
+ --color-accent-emphasis: {{ primary }} !important;
96
+ --color-accent-muted: {{ primary }}66 !important;
97
+ --color-accent-subtle: {{ primary }}26 !important;
98
+ --color-attention-muted: {{ warning }}66 !important;
99
+ --color-attention-subtle: {{ warning }}26 !important;
100
+ --color-header-bg: {{ background_alt }} !important;
101
+ --color-header-text: {{ foreground }} !important;
102
+ }
103
+
104
+ body { background-color: {{ background }} !important; color: {{ foreground }} !important; }
105
+ `;
106
+
107
+ const inject = () => {
108
+ const style = document.createElement('style');
109
+ style.id = 'theme-github';
110
+ style.textContent = CSS;
111
+ (document.head || document.documentElement).appendChild(style);
112
+ };
113
+ // At document-start the root element may not exist yet; wait for it.
114
+ if (document.documentElement) {
115
+ inject();
116
+ } else {
117
+ new MutationObserver((_, obs) => {
118
+ if (document.documentElement) { obs.disconnect(); inject(); }
119
+ }).observe(document, { childList: true });
120
+ }
121
+ })();
@@ -0,0 +1,132 @@
1
+ // ==UserScript==
2
+ // @name Google theme
3
+ // @description Generated by hueman from the active palette. Do not edit by hand.
4
+ // @match *://www.google.com/
5
+ // @match *://www.google.com/?*
6
+ // @match *://www.google.com/webhp*
7
+ // @match *://www.google.com/search*
8
+ // @run-at document-start
9
+ // ==/UserScript==
10
+
11
+ (function () {
12
+ const CSS = `
13
+ /* Google homepage: surfaces and text come from obfuscated custom properties
14
+ defined on :root and re-defined on scoped containers (.X1pLC, .iZKbPe). */
15
+ :root,
16
+ .X1pLC,
17
+ .iZKbPe,
18
+ body {
19
+ color-scheme: dark !important;
20
+
21
+ /* Surfaces */
22
+ --xhUGwc: {{ background }} !important;
23
+ --EpFNW: {{ background }} !important;
24
+ --ZXiaGf: {{ background }} !important;
25
+ --EoKObe: {{ background_alt }} !important;
26
+ --cIehld: {{ background_alt }} !important;
27
+ --CwQ7J: {{ background }} !important;
28
+ --DEeStf: {{ background_alt }} !important;
29
+ --TSWZIb: {{ background_alt }} !important;
30
+ --BRLwE: {{ muted }} !important;
31
+ --XKMDxc: {{ background_alt }} !important;
32
+ --aYn2S: {{ background_alt }} !important;
33
+ --Lm570b: {{ muted }} !important;
34
+ --jwFC2e: {{ muted }} !important;
35
+
36
+ /* Text */
37
+ --YLNNHc: {{ foreground }} !important;
38
+ --COEmY: {{ foreground }} !important;
39
+ --Xqboce: {{ foreground }} !important;
40
+ --jINu6c: {{ foreground }} !important;
41
+ --bbQxAb: {{ foreground }} !important;
42
+ --IXoxUe: {{ foreground }}b3 !important;
43
+ --amnPwe: {{ foreground }}b3 !important;
44
+ --uLz37c: {{ foreground }}b3 !important;
45
+
46
+ /* Accents and links */
47
+ --TMYS9: {{ primary }} !important;
48
+ --TyVYld: {{ primary }} !important;
49
+ --Nsm0ce: {{ primary }} !important;
50
+ --rrJJUc: {{ primary }} !important;
51
+ --JKqx2: {{ secondary }} !important;
52
+ --vZe0jb: {{ primary }} !important;
53
+ --nwXobb: {{ primary }} !important;
54
+ --ZEpPmd: {{ primary }} !important;
55
+ --QWaaaf: {{ primary }} !important;
56
+ --vdwxpe: {{ primary }} !important;
57
+
58
+ /* Borders */
59
+ --gS5jXb: {{ muted }} !important;
60
+ --Aqn7xd: {{ muted }} !important;
61
+ --mXZkqc: {{ muted }} !important;
62
+ --JclFj: {{ muted }} !important;
63
+ --ONhrGd: {{ muted }} !important;
64
+ }
65
+
66
+ html, body { background: {{ background }} !important; color: {{ foreground }} !important; }
67
+
68
+ /* Hardcoded colors the variables do not reach */
69
+ body #gb .gb_R, body header#gb { background: transparent !important; }
70
+ body .RNNXgb { border-color: {{ muted }} !important; background: {{ background_alt }} !important; box-shadow: none !important; }
71
+ body .sbfc .RNNXgb,
72
+ body .emcav .RNNXgb,
73
+ body .BgPPrc .RNNXgb { border-color: {{ primary }} !important; background: {{ background_alt }} !important; }
74
+ body .aajZCb { background: {{ background_alt }} !important; border-color: {{ muted }} !important; box-shadow: none !important; }
75
+ body textarea.gLFyf, body .gLFyf { color: {{ foreground }} !important; background: transparent !important; caret-color: {{ primary }} !important; }
76
+ body .gLFyf::placeholder { color: {{ foreground }}80 !important; }
77
+ body .izN7If:hover:not(:disabled),
78
+ body .izN7If:focus:not(:disabled) { background: {{ muted }}66 !important; }
79
+ body .EpPYLd, body g-menu, body g-popup .UjBGL { background: {{ background_alt }} !important; color: {{ foreground }} !important; }
80
+ body .CjiZvb, body .GZnQqe.EpPYLd:active { background-color: {{ muted }}66 !important; }
81
+ body .Ij8KCd, body .O3yKUb { background: {{ background_alt }} !important; border-color: {{ muted }} !important; }
82
+ body .eQtdDf, body a.eQtdDf { color: {{ foreground }} !important; }
83
+ body .b77HKf { background-color: {{ background_alt }} !important; }
84
+ body .Txngnb { color: {{ foreground }} !important; }
85
+ body .xab99e .niO4u.niO4u { background: {{ background_alt }} !important; border-color: {{ muted }} !important; }
86
+ body .ynRric { color: {{ foreground }}b3 !important; }
87
+ body .plR5qb .bvUkz { --aim-button-gradient-start: {{ background_alt }} !important; --aim-button-gradient-end: {{ background_alt }} !important; }
88
+
89
+ /* ---- Search results page (/search) ---- */
90
+ body #main, body #cnt, body #rcnt, body #center_col, body #rso, body #search,
91
+ body #topstuff, body #botstuff, body #bres, body #appbar, body #slim_appbar,
92
+ body #top_nav, body #hdtb, body #searchform, body #sfooter, body #footcnt,
93
+ body #fbar, body #fbarcnt, body #lfootercc, body #before-appbar, body #atvcap {
94
+ background: {{ background }} !important;
95
+ color: {{ foreground }} !important;
96
+ border-color: {{ muted }} !important;
97
+ }
98
+ body #searchform, body #searchform .sfbg, body #searchform form#tsf { background: {{ background }} !important; box-shadow: none !important; }
99
+ body #hdtb, body #hdtb-msb { border-bottom-color: {{ muted }} !important; }
100
+ body #result-stats, body #hdtb-tls, body #hdtb-tls * { color: {{ foreground }}b3 !important; }
101
+
102
+ /* Result entries */
103
+ body #rso a h3, body #rso h3.LC20lb { color: {{ primary }} !important; }
104
+ body #rso a:visited h3 { color: {{ secondary }} !important; }
105
+ body #rso cite, body #rso .tjvcx, body #rso .qLRx3b, body #rso .VuuXrf { color: {{ foreground }}b3 !important; }
106
+ body #rso .VwiC3b, body #rso .VwiC3b *, body #rso .byrV5b { color: {{ foreground }} !important; }
107
+ body #rso .VwiC3b em, body #rso .VwiC3b b { color: {{ warning }} !important; }
108
+ body #rso .MjjYud, body #rso .kb0PBd { background: transparent !important; }
109
+
110
+ /* Right panel, related searches, pagination, footer */
111
+ body #botstuff a, body #foot a, body #fbar a, body #sfooter a { color: {{ primary }} !important; }
112
+ body #fbar, body #fbar *, body #sfooter { color: {{ foreground }}b3 !important; }
113
+ body #sfooter, body #fbar { border-color: {{ muted }} !important; }
114
+ body #botstuff td a, body #botstuff .SJajHc { color: {{ primary }} !important; }
115
+ body #botstuff .YyVfkd { color: {{ foreground }} !important; }
116
+ `;
117
+
118
+ const inject = () => {
119
+ const style = document.createElement('style');
120
+ style.id = 'theme-google';
121
+ style.textContent = CSS;
122
+ (document.head || document.documentElement).appendChild(style);
123
+ };
124
+ // At document-start the root element may not exist yet; wait for it.
125
+ if (document.documentElement) {
126
+ inject();
127
+ } else {
128
+ new MutationObserver((_, obs) => {
129
+ if (document.documentElement) { obs.disconnect(); inject(); }
130
+ }).observe(document, { childList: true });
131
+ }
132
+ })();