From a1a3e433eb9689d6e8d91750c7577a5b6ff32f26 Mon Sep 17 00:00:00 2001
From: stuebinm
Date: Sun, 7 Apr 2024 20:15:35 +0200
Subject: home: glow → lowdown for markdown viewing

lowdown isn't very good, but at least it doesn't have any weird cloud
features (why is this the standard for things that show text??)
---
 home/home-minimal.nix     | 6 ++++--
 home/packages-minimal.nix | 1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

(limited to 'home')

diff --git a/home/home-minimal.nix b/home/home-minimal.nix
index c2475ce..fa969a6 100644
--- a/home/home-minimal.nix
+++ b/home/home-minimal.nix
@@ -57,7 +57,6 @@
       ll = "exa -lh --icons";
       llt = "exa -lh --tree --icons";
       lt = "exa --tree --icons";
-      md = "glow -p";
       puny = "idn --quiet";
       unpuny = "idn --quiet -u";
     };
@@ -65,13 +64,16 @@
       fish_greeting = {
         body = "";
       };
+      md = ''
+        lowdown -tterm --term-columns=(tput cols) $argv[1] | less
+      '';
       mds.body = ''
         if [ "$argv[1]" = "" ]
           set pattern ".md"
         else
           set pattern $argv[1]
         end
-        fd $pattern | fzf --preview="glow {} --style=dark" --bind ctrl-j:preview-down,ctrl-k:preview-up,ctrl-alt-j:preview-page-down,ctrl-alt-k:preview-page-up
+        fd $pattern | fzf --preview="lowdown -tterm {}" --bind ctrl-j:preview-down,ctrl-k:preview-up,ctrl-alt-j:preview-page-down,ctrl-alt-k:preview-page-up
       '';
       git-where.body = ''
         set gits (fd "^\\.git\$" -H)
diff --git a/home/packages-minimal.nix b/home/packages-minimal.nix
index ceea6e5..c024654 100644
--- a/home/packages-minimal.nix
+++ b/home/packages-minimal.nix
@@ -26,6 +26,7 @@
     gauche
     # html, js & co
     jq html-tidy nodePackages.stylelint nodePackages.js-beautify zola
+    lowdown
     # nix things
     nixfmt niv inputs.deploy-rs.defaultPackage.${system}
   ];
-- 
cgit v1.2.3