[download]

local/bin/man-menu

   1 #!/bin/bash
   2 #         ░███████
   3 #       ░███████       D O T F I L E S
   4 #       ░███████       M A N - M E N U
   5 #    ░█████████████
   6 #       ░███████
   7 #       ░███████       LGPL <http://www.gnu.org/licenses/>
   8 #       ░██  ░██
   9 #       ░██  ░██   (C) 2020 Alexey Gagin <http://www.lexa.by/dotfiles/>
  10 
  11 w=/usr/share/doc/arch-wiki/html/en
  12 
  13 {
  14     man -k .| tr ' ' \|            | sed '      s/$/ - Manpage/'  | column -t | tr \| ' '
  15     cd $w && find * -name '*.html' | sed 's/\.html$/ - Archwiki/' | column -t
  16 } | menu -Li man | while read i; do
  17     [[ $i == *Manpage  ]] && term man ${i// *} &
  18     [[ $i == *Archwiki ]] && chromium file://$w/${i// *}.html &
  19 done