Added man page menu script
This commit is contained in:
parent
98d6d13f8f
commit
db3230f980
3 changed files with 18 additions and 3 deletions
11
.local/bin/menu-man
Executable file
11
.local/bin/menu-man
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
sel="$(man -k . | rofi -dmenu -i -p "Man page:")"
|
||||
[ "$sel" = "" ] && exite # Exit on no selection
|
||||
|
||||
# Selection comes in the form of:
|
||||
# $program ($num) - $desc
|
||||
# Need to run `man $num $program`
|
||||
page="$(echo "$sel" | awk -F'[()]' '{print $2" "$1}')"
|
||||
nohup $TERMINAL -e man $page >/dev/null 2>&1 &
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue