Added man page menu script
This commit is contained in:
parent
98d6d13f8f
commit
db3230f980
3 changed files with 18 additions and 3 deletions
|
|
@ -144,6 +144,8 @@ bind = $mainMod CONTROL SHIFT, P, exec, grimblast --freeze copysave screen /tmp
|
||||||
# Launch menu scripts with Super-D keychord
|
# Launch menu scripts with Super-D keychord
|
||||||
bind = $mainMod, D, exec, hyprctl dispatch submap menu-submap; sleep 2; hyprctl dispatch submap reset
|
bind = $mainMod, D, exec, hyprctl dispatch submap menu-submap; sleep 2; hyprctl dispatch submap reset
|
||||||
submap = menu-submap
|
submap = menu-submap
|
||||||
|
bind = ,M, exec, menu-man
|
||||||
|
bind = ,M, submap, reset
|
||||||
bind = ,O, exec, menu-wpio sink
|
bind = ,O, exec, menu-wpio sink
|
||||||
bind = ,O, submap, reset
|
bind = ,O, submap, reset
|
||||||
bind = ,I, exec, menu-wpio source
|
bind = ,I, exec, menu-wpio source
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ super + shift + r
|
||||||
|
|
||||||
# Running dmenu/rofi scripts
|
# Running dmenu/rofi scripts
|
||||||
ctrl + alt + BackSpace
|
ctrl + alt + BackSpace
|
||||||
$TERMINAL -e $SHELL -c 'htop'
|
st -e $SHELL -c 'htop'
|
||||||
super + r
|
super + r
|
||||||
menu-run
|
menu-run
|
||||||
super + d; p
|
super + d; p
|
||||||
|
|
@ -18,6 +18,8 @@ super + grave
|
||||||
menu-unicode
|
menu-unicode
|
||||||
super + d; l
|
super + d; l
|
||||||
menu-layout
|
menu-layout
|
||||||
|
super + d; m
|
||||||
|
menu-man
|
||||||
super + n
|
super + n
|
||||||
menu-norg
|
menu-norg
|
||||||
|
|
||||||
|
|
@ -31,11 +33,11 @@ super + c
|
||||||
super + u
|
super + u
|
||||||
emacsclient -c -a "emacs" -n --eval '(vterm-frame)'
|
emacsclient -c -a "emacs" -n --eval '(vterm-frame)'
|
||||||
super + Return
|
super + Return
|
||||||
$TERMINAL
|
st
|
||||||
super + w
|
super + w
|
||||||
$BROWSER
|
$BROWSER
|
||||||
super + e
|
super + e
|
||||||
$TERMINAL -e $SHELL -c 'tmp="$(mktemp)" && command lf -last-dir-path="$tmp" "$@" && test -f "$tmp" && dir="$(command cat "$tmp")" && rm -f "$tmp" && test -d "$dir" && cd "$dir" && exec $SHELL'
|
st -e $SHELL -c 'tmp="$(mktemp)" && command lf -last-dir-path="$tmp" "$@" && test -f "$tmp" && dir="$(command cat "$tmp")" && rm -f "$tmp" && test -d "$dir" && cd "$dir" && exec $SHELL'
|
||||||
super + s; e
|
super + s; e
|
||||||
emacsclient -c -a 'emacs'
|
emacsclient -c -a 'emacs'
|
||||||
|
|
||||||
|
|
|
||||||
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