about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--hm/soispha/pkgs/scripts.nix7
-rwxr-xr-xhm/soispha/pkgs/scripts/wrappers/show9
2 files changed, 16 insertions, 0 deletions
diff --git a/hm/soispha/pkgs/scripts.nix b/hm/soispha/pkgs/scripts.nix
index ba825f31..ec90c8f8 100644
--- a/hm/soispha/pkgs/scripts.nix
+++ b/hm/soispha/pkgs/scripts.nix
@@ -102,6 +102,12 @@
     path = "small_functions";
     dependencies = builtins.attrValues {inherit (pkgs) grim slurp wl-clipboard;};
   };
+  show-scr = write_shell {
+    name = "show";
+    path = "wrappers";
+    keep_path = true; # I might want to use nvim in less (and shell escapes)
+    dependencies = builtins.attrValues {inherit (pkgs) less locale;};
+  };
   neorg-scr = sysLib.writeShellScript {
     name = "neorg";
     keep_path = true;
@@ -277,6 +283,7 @@ in [
   nest_comments-scr
   screenshot_persistent-scr
   screenshot_temporary-scr
+  show-scr
   spodi-scr
   update-sys-scr
   virsh-del-scr
diff --git a/hm/soispha/pkgs/scripts/wrappers/show b/hm/soispha/pkgs/scripts/wrappers/show
new file mode 100755
index 00000000..584c419f
--- /dev/null
+++ b/hm/soispha/pkgs/scripts/wrappers/show
@@ -0,0 +1,9 @@
+#!/usr/bin/env dash
+
+# shellcheck source=/dev/null
+SHELL_LIBRARY_VERSION="2.0.9" . %SHELL_LIBRARY_PATH
+
+# Maybe add `--quit-if-one-screen`
+less --redraw-on-quit "$@"
+
+# vim: ft=sh