aboutsummaryrefslogtreecommitdiff
path: root/dotfiles
diff options
context:
space:
mode:
authorYaroslav <contact@yaroslavps.com>2020-08-28 17:12:18 +0300
committerYaroslav <contact@yaroslavps.com>2020-08-28 17:12:18 +0300
commit12b30d57cf37fa289d904e6b120f83766ff02135 (patch)
tree25e561bc19e750511a3d0d289382c49a633d0f1e /dotfiles
parentc38e8c2a695bf648fe8a614d39c11a56c80848e3 (diff)
downloadswayrice-12b30d57cf37fa289d904e6b120f83766ff02135.tar.gz
swayrice-12b30d57cf37fa289d904e6b120f83766ff02135.zip
added menu for man pages
Diffstat (limited to 'dotfiles')
-rw-r--r--dotfiles/.config/sway/config5
-rwxr-xr-xdotfiles/.local/bin/menuman21
2 files changed, 24 insertions, 2 deletions
diff --git a/dotfiles/.config/sway/config b/dotfiles/.config/sway/config
index 2db1645..2427b90 100644
--- a/dotfiles/.config/sway/config
+++ b/dotfiles/.config/sway/config
@@ -19,7 +19,7 @@ default_floating_border pixel 2
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
-font pango:BlexMono Nerd Font Mono 9
+font pango:BlexMono Nerd Font Mono 8
# Use Mouse+$mod to drag floating windows
floating_modifier $mod
@@ -173,6 +173,7 @@ bindsym --to-code {
# Start Applications
$mod+Shift+w exec --no-startup-id $browser
$mod+Ctrl+w exec --no-startup-id chromium
+ $mod+F1 exec menuman
$mod+F2 exec menumako
$mod+F3 exec menudisplay
$mod+F4 exec menublk
@@ -320,7 +321,7 @@ bindsym --to-code {
$mod+Ctrl+r exec --no-startup-id waybar_launch
# show/hide waybar
- $mod+F1 exec --no-startup-id "killall -10 waybar"
+ $mod+F11 exec --no-startup-id "killall -10 waybar"
# Shut down, restart and locking features
$mod+Shift+e exec menusession
diff --git a/dotfiles/.local/bin/menuman b/dotfiles/.local/bin/menuman
new file mode 100755
index 0000000..868d801
--- /dev/null
+++ b/dotfiles/.local/bin/menuman
@@ -0,0 +1,21 @@
+#!/bin/sh
+# Search and open man page
+
+list="$(man -k . | awk '{ print $1$2 }')"
+
+if [ "$1" = "-t" ]; then
+ chosen=$(printf "$list" | fzf)
+else
+ # Source settings from .bemenurc
+ . ~/.config/bemenurc
+
+ action="$TERMINAL -e"
+ chosen=$(printf "$list" | bemenu -p "Select man page:" -i -l 25 --tf="$BEMENU_TF" --tb="$BEMENU_NB" --fb="$BEMENU_NB" --fn="$BEMENU_FN" --nb="$BEMENU_NB" --nf="$BEMENU_NF" --hf="$BEMENU_HF" --hb="$BEMENU_HB" --monitor="$BEMENU_MONITOR")
+fi
+
+if [ -z "$chosen" ]; then
+ exit 0
+fi
+
+[ -n "$action" ] && $action "man $chosen" && exit 0
+man $chosen