aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--dunst/.config/dunst/dunstrc2
-rwxr-xr-xsh/.local/bin/powermenu19
-rw-r--r--sway/.config/sway/config22
-rwxr-xr-xsway/.local/bin/wmenu_path34
-rw-r--r--swayr/.config/swayr/config.toml14
5 files changed, 68 insertions, 23 deletions
diff --git a/dunst/.config/dunst/dunstrc b/dunst/.config/dunst/dunstrc
index 0cf89b2..6d7fe30 100644
--- a/dunst/.config/dunst/dunstrc
+++ b/dunst/.config/dunst/dunstrc
@@ -12,7 +12,7 @@
icon_path = /usr/share/icons
enable_recursive_icon_lookup = true
icon_theme = gruvbox-dark-icons-gtk, Adwaita
- dmenu = ~/.local/bin/dmenu-wl
+ dmenu = "/usr/bin/wmenu -i -f 'monospace 12' -nebdbb2 -N282828 -S282828 -sfe8019 -mebdbb2 -M8ec07c"
mouse_left_click = do_action, close_current
mouse_middle_click = context, close_current
mouse_right_click = close_current
diff --git a/sh/.local/bin/powermenu b/sh/.local/bin/powermenu
index 688ae3b..0166eee 100755
--- a/sh/.local/bin/powermenu
+++ b/sh/.local/bin/powermenu
@@ -1,15 +1,18 @@
-#!/usr/bin/sh
+#!/bin/sh
-if [ "$#" -eq 0 ]; then
- set -- $(awk '{print tolower($2)}')
+if [ ! -t 0 ]; then
+ set -- "$(awk '{print tolower($2)}')"
+elif [ $# -eq 0 ]; then
+ printf '%s\n' '󰌾 Lock' '󰍃 Logout' '⏾ Suspend' '󰋊 Hibernate' '󰜉 Reboot' '󰐥 Poweroff'
+ exit 0
fi
case "$1" in
lock)
- loginctl lock-session ${XDG_SESSION_ID-}
+ loginctl lock-session "${XDG_SESSION_ID-}"
;;
logout)
- loginctl terminate-session ${XDG_SESSION_ID-}
+ loginctl terminate-session "${XDG_SESSION_ID-}"
;;
suspend)
systemctl suspend
@@ -23,10 +26,8 @@ reboot)
poweroff)
systemctl poweroff
;;
-*list)
- printf '%s\n' '󰌾 Lock' '󰍃 Logout' '󰋊 Hibernate' '󰒲 Suspend' '󰜉 Reboot' '󰐥 Poweroff'
- ;;
*)
- echo "Invalid argument: $@"
+ echo "Invalid argument: $*"
+ exit 1
;;
esac
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
diff --git a/swayr/.config/swayr/config.toml b/swayr/.config/swayr/config.toml
index e519670..6f4a00d 100644
--- a/swayr/.config/swayr/config.toml
+++ b/swayr/.config/swayr/config.toml
@@ -1,6 +1,16 @@
[menu]
-executable = 'rofi'
-args = ['-dmenu', '-markup', '--allow-images']
+executable = 'wmenu'
+args = [
+ '-i',
+ '-f',
+ 'monospace 12',
+ '-nebdbb2',
+ '-N282828',
+ '-S282828',
+ '-sfe8019',
+ '-mebdbb2',
+ '-M8ec07c',
+]
[format]
output_format = '{indent}<b>Output {name}</b> <span alpha="20000">({id})</span>'