diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 5719967..cde4bfe 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -144,6 +144,8 @@ bind = $mainMod CONTROL SHIFT, P, exec, grimblast --freeze copysave screen /tmp # Launch menu scripts with Super-D keychord bind = $mainMod, D, exec, hyprctl dispatch submap menu-submap; sleep 2; hyprctl dispatch submap reset submap = menu-submap +bind = ,M, exec, menu-man +bind = ,M, submap, reset bind = ,O, exec, menu-wpio sink bind = ,O, submap, reset bind = ,I, exec, menu-wpio source diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 54f337c..78784b7 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -7,7 +7,7 @@ super + shift + r # Running dmenu/rofi scripts ctrl + alt + BackSpace - $TERMINAL -e $SHELL -c 'htop' + st -e $SHELL -c 'htop' super + r menu-run super + d; p @@ -18,6 +18,8 @@ super + grave menu-unicode super + d; l menu-layout +super + d; m + menu-man super + n menu-norg @@ -31,11 +33,11 @@ super + c super + u emacsclient -c -a "emacs" -n --eval '(vterm-frame)' super + Return - $TERMINAL + st super + w $BROWSER 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 emacsclient -c -a 'emacs' diff --git a/.local/bin/menu-man b/.local/bin/menu-man new file mode 100755 index 0000000..c719630 --- /dev/null +++ b/.local/bin/menu-man @@ -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 & +