darkrc/bin/mansplain

8 lines
263 B
Text
Raw Permalink Normal View History

#!/bin/sh
2020-07-21 18:02:17 +00:00
alias dmenu="$HOME/darkrc/bin/dmenu-themed "
manpage=$(apropos . | awk '{print $1}' | dmenu -p 'Mansplain what?' -l 10 -b)
if [ -z "$manpage" ];
then echo "Manpage not found or no manpage selected"; exit
else man -Tps $manpage | ps2pdf - | zathura -
fi