From 5a2d75df546df3321b3a20ebe84dae2f91019e84 Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Fri, 15 Jul 2022 18:17:56 +0430 Subject: secrets --- bin/xman | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'bin/xman') diff --git a/bin/xman b/bin/xman index 5f4efed..c0de313 100755 --- a/bin/xman +++ b/bin/xman @@ -2,8 +2,21 @@ # xmandoc MANPAGE - read manpage of possibly not installed package xlocate "man/man..\?/$1\.[0-9]" 2>/dev/null | - { grep . || { echo "xmandoc: No entry for $1 found." 1>&2; exit 1; } } | - while read -r pkg page; do - page=${page#* -> } - xbps-query --cat=$page ${pkg%-*} | mandoc -O width=205 -a - done + { grep . || { + echo "xmandoc: No entry for $1 found." 1>&2 + exit 1 + }; } | + while read -r pkg page; do + page=${page#* -> } + # xbps-query --cat=$page ${pkg%-*} | mandoc -O width=205 -a + xbps-query --cat=$page ${pkg%-*} | + mandoc -O width=205 -c | col -b | + vim - -M -R \ + -c 'set ft=man nomod nolist' \ + -c 'silent only' \ + -c 'colo iceberg' \ + -c 'highlight Normal ctermbg=None' \ + -c 'highlight lineNr ctermbg=16' \ + -c 'hi EndOfBuffer ctermbg=16' \ + +only + done -- cgit v1.2.3