i3-man 376 B

1234567891011121314
  1. #!/bin/sh
  2. if [[ $1 == "show" || $# -lt 1 ]] ; then
  3. if [[ -e `which rofi` ]] ; then
  4. PAGE=`man -k . | awk -e '{print $1}' | rofi -dmenu -p "man page:"`
  5. [[ $PAGE != "" ]] && exec urxvto -e man $PAGE
  6. else
  7. PAGE=`man -k . | awk -e '{print $1}' | dmenu`
  8. [[ $PAGE != "" ]] && exec urxvto -e man $PAGE
  9. fi
  10. else
  11. exec urxvto -e man $1
  12. fi