aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sway
diff options
context:
space:
mode:
authorToby Vincent <tobyv@tobyvin.dev>2024-02-14 17:57:54 -0600
committerToby Vincent <tobyv@tobyvin.dev>2024-02-14 17:57:54 -0600
commitf5ad2685ab35ee16967a3e0c5c2f8b71d1559739 (patch)
tree34b2587af18503da1b063e3c84b2b7acd5905210 /sway
parenta80e6652f58afcfd48d3fd936c143f919db1c46a (diff)
feat(wmenu): change menu to wmenu (again...)
Diffstat (limited to 'sway')
-rw-r--r--sway/.config/sway/config22
-rwxr-xr-xsway/.local/bin/wmenu_path34
2 files changed, 45 insertions, 11 deletions
diff --git a/sway/.config/sway/config b/sway/.config/sway/config
index 907888d..303637a 100644
--- a/sway/.config/sway/config
+++ b/sway/.config/sway/config
@@ -1,6 +1,6 @@
set $mod Mod4
-set $menu tofi
-set $menu_list tofi --config ~/.config/tofi/vertical.config
+set $menu_opts -i -f 'monospace 12' -nebdbb2 -N282828 -S282828 -sfe8019 -mebdbb2 -M8ec07c
+set $menu wmenu $menu_opts
set $left h
set $down j
@@ -67,19 +67,19 @@ bindsym $mod+q kill
bindsym $mod+Shift+c reload
bindsym $mod+Shift+Escape exec swaynag -t warning -m 'Exit sway?' -B 'Yes' 'swaymsg exit'
bindsym $mod+ctrl+q exec loginctl lock-session
-bindsym $mod+Escape exec powermenu list | $menu | powermenu
+bindsym $mod+Escape exec powermenu | $menu -l 6 | powermenu
bindsym $mod+return exec $TERMINAL
bindsym $mod+w exec $BROWSER
bindsym Print exec slurp | grim -g - - | wl-copy --type image/png
bindsym $mod+Print exec /usr/share/sway/scripts/grimshot --notify save area
-bindsym $mod+space exec tofi-drun | xargs swaymsg exec --
-bindsym $mod+shift+space exec tofi-run | xargs swaymsg exec --
-bindsym $mod+v exec cliphist list | $menu_list | cliphist decode | wl-copy
-bindsym $mod+Shift+v exec cliphist list | $menu_list | cliphist delete
-bindsym $mod+p exec passmenu
-bindsym $mod+Shift+p exec passmenu --type
-bindsym $mod+y exec yubikey-oath-dmenu --notify --clipboard --menu-cmd $menu
-bindsym $mod+Shift+y exec yubikey-oath-dmenu --notify --type --menu-cmd $menu
+bindsym $mod+space exec j4-dmenu-desktop --dmenu="$menu" --term=$TERMINAL
+bindsym $mod+shift+space exec wmenu_path | $menu | xargs swaymsg exec --
+bindsym $mod+v exec cliphist list | $menu -l 10 | cliphist decode | wl-copy
+bindsym $mod+Shift+v exec cliphist list | $menu -l 10 | cliphist delete
+bindsym $mod+p exec passmenu $menu_opts
+bindsym $mod+Shift+p exec passmenu --type $menu_opts
+bindsym $mod+y exec yubikey-oath-dmenu --notify --clipboard --menu-cmd "$menu -l 10"
+bindsym $mod+Shift+y exec yubikey-oath-dmenu --notify --type --menu-cmd "$menu -l 10"
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
diff --git a/sway/.local/bin/wmenu_path b/sway/.local/bin/wmenu_path
new file mode 100755
index 0000000..2cda132
--- /dev/null
+++ b/sway/.local/bin/wmenu_path
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+cache_dir="${XDG_CACHE_HOME:-"$HOME/.cache"}"
+cache="$cache_dir/wmenu_run"
+
+uptodate() {
+ IFS=:
+ for path in $PATH; do
+ if test "$path" -nt "$cache"; then
+ return 1
+ fi
+ done
+
+ return 0
+}
+
+get_bin() {
+ IFS=:
+ for path in $PATH; do
+ for bin in "$path"/*; do
+ if [ -x "$bin" ]; then
+ echo "${bin##*/}"
+ fi
+ done
+ done
+}
+
+[ ! -e "$cache_dir" ] && mkdir -p "$cache_dir"
+
+if [ ! -e "$cache" ] || ! uptodate; then
+ get_bin | sort -u | tee "$cache"
+else
+ cat "$cache"
+fi