1
0
Fork 0

glow theming

This commit is contained in:
Luca Bilke 2024-01-31 10:53:02 +01:00
parent c84dd0b0f5
commit 95fe0c0aed
3 changed files with 217 additions and 2 deletions

View File

@ -1,5 +1,5 @@
# style name or JSON path (default "auto")
style: "auto"
style: /home/luca/.config/glow/style.json
# show local files only; no network (TUI-mode only)
local: true
# mouse support (TUI-mode only)

215
.config/glow/style.json Normal file
View File

@ -0,0 +1,215 @@
{
"document": {
"block_prefix": "\n",
"block_suffix": "\n",
"color": "#c8d3f5",
"margin": 2
},
"block_quote": {
"indent": 1,
"indent_token": "│ ",
"color": "#4e5579"
},
"paragraph": {},
"list": {
"level_indent": 2,
"color": "#9abdf5"
},
"heading": {
"color": "#4fd6be",
"bold": true
},
"h1": {
"prefix": "▋ ",
"color": "#89ddff",
"bold": true,
"block_suffix": "\n"
},
"h2": {
"prefix": "▌ ",
"color": "#61bdf2",
"bold": true
},
"h3": {
"prefix": "┃ ",
"color": "#82aaff",
"bold": true
},
"h4": {
"prefix": "│ ",
"color": "#6d91de",
"bold": true
},
"h5": {
"prefix": "┆ ",
"color": "#9aa5ce",
"bold": true
},
"h6": {
"prefix": "┊ ",
"color": "#61bdf2"
},
"text": {
"color": "#c8d3f5"
},
"strikethrough": {
"crossed_out": true
},
"emph": {
"italic": true
},
"strong": {
"bold": true
},
"hr": {
"color": "#444b6a",
"format": "\n--------\n"
},
"item": {
"color": "#9abdf5",
"block_prefix": "• "
},
"enumeration": {
"color": "#9abdf5",
"block_prefix": ". "
},
"task": {
"color": "#9abdf5",
"ticked": "[✓] ",
"unticked": "[ ] "
},
"link": {
"color": "#4fd6be",
"block_prefix": "(",
"block_suffix": ")",
"conceal": true,
"underline": true
},
"link_text": {
"color": "#4fd6be",
"block_prefix": "[",
"block_suffix": "]",
"underline": true
},
"image": {
"color": "#4fd6be",
"underline": true
},
"image_text": {
"color": "#4fd6be",
"format": "Image: {{.text}} →"
},
"code": {
"color": "#c8d3f5"
},
"code_block": {
"color": "244",
"margin": 2,
"chroma": {
"text": {
"color": "#89ddff"
},
"error": {
"color": "#c53b53",
"underline": true
},
"comment": {
"color": "#636da6"
},
"comment_preproc": {
"color": "#4fd6be"
},
"keyword": {
"color": "#c099ff"
},
"keyword_reserved": {
"color": "#c099ff"
},
"keyword_namespace": {
"color": "#0db9d7"
},
"keyword_type": {
"color": "#c099ff"
},
"operator": {
"color": "#89ddff"
},
"punctuation": {
"color": "#ba3c97"
},
"name": {
"style": "italic"
},
"name_builtin": {
"color": "#65bcff"
},
"name_tag": {
"color": "#ff757f"
},
"name_attribute": {
"color": "#c099ff"
},
"name_class": {
"color": "#0db9d7"
},
"name_constant": {
"color": "#c099ff"
},
"name_decorator": {
"color": "#82aaff"
},
"name_exception": {
"color": "#7dcfff",
"italic": true
},
"name_function": {
"color": "#82aaff"
},
"name_other": {
"color": "#636da6"
},
"literal": {},
"literal_number": {
"color": "#ff966c"
},
"literal_date": {},
"literal_string": {
"color": "#4fd6be"
},
"literal_string_escape": {
"color": "#89ddff"
},
"generic_deleted": {
"color": "#e26a75"
},
"generic_emph": {
"italic": true
},
"generic_inserted": {
"color": "#b8db87"
},
"generic_strong": {
"bold": true
},
"generic_subheading": {},
"background": {
"background_color": "#222436"
}
}
},
"table": {
"center_separator": "┼",
"column_separator": "│",
"row_separator": "─"
},
"definition_list": {},
"definition_term": {},
"definition_description": {
"block_prefix": "\n🠶 "
},
"html_block": {},
"html_span": {}
}

View File

@ -86,7 +86,7 @@ mimetest() {
image/*) image "$f" "$w" "$h" "$x" "$y" ;;
video/*) video "$f" "$w" "$h" "$x" "$y" ;;
*opendocument*) run odt2txt "$f" ;;
*/markdown) run glow "$f" --width "$w";;
*/markdown) run glow -s "$XDG_CONFIG_HOME/glow/style.json" "$f" --width "$w";;
*/html) run lynx -dump "$f" ;;
*) return 1 ;;
esac