1
0
Fork 0

switch out glow for lowdown

This commit is contained in:
Luca Bilke 2022-08-17 17:15:25 +02:00
parent 17e08fc551
commit 91f5fb486d
3 changed files with 1 additions and 98 deletions

View File

@ -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

View File

@ -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": {}
}

View File

@ -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;;