From 91f5fb486d5fbd1609ff35c248869b863edc626d Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Wed, 17 Aug 2022 17:15:25 +0200 Subject: [PATCH] switch out glow for lowdown --- .config/glow/glow.yml | 10 ----- .config/glow/notty.json | 87 ----------------------------------------- .config/lf/preview | 2 +- 3 files changed, 1 insertion(+), 98 deletions(-) delete mode 100644 .config/glow/glow.yml delete mode 100644 .config/glow/notty.json diff --git a/.config/glow/glow.yml b/.config/glow/glow.yml deleted file mode 100644 index b4af2ad1f..000000000 --- a/.config/glow/glow.yml +++ /dev/null @@ -1,10 +0,0 @@ -# style name or JSON path (default "auto") -style: "~/.config/glow/notty.json" -# show local files only; no network (TUI-mode only) -local: false -# mouse support (TUI-mode only) -mouse: false -# use pager to display markdown -pager: false -# word-wrap at width -width: 80 diff --git a/.config/glow/notty.json b/.config/glow/notty.json deleted file mode 100644 index b49ec1de3..000000000 --- a/.config/glow/notty.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "document": { - "block_prefix": "\n", - "block_suffix": "\n", - "margin": 2 - }, - "block_quote": { - "indent": 1, - "indent_token": "│ " - }, - "paragraph": {}, - "list": { - "level_indent": 4 - }, - "heading": { - "block_suffix": "\n" - }, - "h1": { - "prefix": "# " - }, - "h2": { - "prefix": "## " - }, - "h3": { - "prefix": "### " - }, - "h4": { - "prefix": "#### " - }, - "h5": { - "prefix": "##### " - }, - "h6": { - "prefix": "###### " - }, - "text": {}, - "strikethrough": { - "block_prefix": "~~", - "block_suffix": "~~" - }, - "emph": { - "block_prefix": "*", - "block_suffix": "*" - }, - "strong": { - "block_prefix": "**", - "block_suffix": "**" - }, - "hr": { - "format": "\n--------\n" - }, - "item": { - "block_prefix": "• " - }, - "enumeration": { - "block_prefix": ". " - }, - "task": { - "ticked": "[✓] ", - "unticked": "[ ] " - }, - "link": {}, - "link_text": {}, - "image": {}, - "image_text": { - "format": "Image: {{.text}} →" - }, - "code": { - "block_prefix": "`", - "block_suffix": "`" - }, - "code_block": { - "margin": 2 - }, - "table": { - "center_separator": "┼", - "column_separator": "│", - "row_separator": "─" - }, - "definition_list": {}, - "definition_term": {}, - "definition_description": { - "block_prefix": "\n🠶 " - }, - "html_block": {}, - "html_span": {} -} diff --git a/.config/lf/preview b/.config/lf/preview index f8a8a0ce0..50e2a16f4 100755 --- a/.config/lf/preview +++ b/.config/lf/preview @@ -48,7 +48,7 @@ case "$(xdg-mime query filetype "$1")" in image/*) image "$1" "$2" "$3" "$4" "$5" ;; video/*) video "$1" "$2" "$3" "$4" "$5" ;; *opendocument*) odt2txt "$1" && exit 0 || echo -e "\e[31modt2txt not installed\e[0m" && exit 1;; - */markdown) glow "$1" && exit 0 || echo -e "\e[31mglow not installed (https://github.com/charmbracelet/glow)\e[0m" && exit 1;; + */markdown) lowdown -T term "$1" && exit 0 || echo -e "\e[31mglow not installed (https://github.com/charmbracelet/glow)\e[0m" && exit 1;; */html) w3m -dump "$1" && exit 0 || lynx -dump "$1" && exit 0 || echo -e "\e[31neither lynx nor w3m installed\e[0m" && exit 1;; text/*|*/json|*/xml) batorcat "$1" "$2" ;; */pdf) [ ! -f "${CACHE}.jpg" ] && pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE"; image "${CACHE}.jpg" "$2" "$3" "$4" "$5" && exit 0 || echo -e "\e[31mpoppler-utils not installed\e[0m" && exit 1;;