diff options
author | Patrick Spek <p.spek@tyil.nl> | 2023-06-13 13:49:08 +0200 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2023-06-13 13:49:08 +0200 |
commit | 93c51d657299919af2b9cd624f4572869453162a (patch) | |
tree | de4bec031155b23788d6b36a3ff781a51c9e85d8 | |
parent | 6a14a0502bb819570be0d70ca03b9d27540bcc98 (diff) |
Update dmenu wrapper to work with fuzzel on wayland
-rw-r--r-- | .config/fuzzel/fuzzel.ini | 20 | ||||
-rwxr-xr-x | .local/bin/dmenu | 22 |
2 files changed, 37 insertions, 5 deletions
diff --git a/.config/fuzzel/fuzzel.ini b/.config/fuzzel/fuzzel.ini new file mode 100644 index 0000000..1c374a7 --- /dev/null +++ b/.config/fuzzel/fuzzel.ini @@ -0,0 +1,20 @@ +[main] +font = monospace:size=10 +lines = 15 +width = 80 +horizontal-pad = 8 +vertical-pad = 8 + +[colors] +background = 252a35ff +selection = 5294e2ff +text = eeeeeeff +selection-text = eeeeeeff + +[border] +radius = 4 + +[key-bindings] +execute-or-next = none +delete-prev-word = Control+BackSpace Control+w +next = Down Control+n Tab diff --git a/.local/bin/dmenu b/.local/bin/dmenu index 78cdf52..6c1494b 100755 --- a/.local/bin/dmenu +++ b/.local/bin/dmenu @@ -1,8 +1,20 @@ #!/usr/bin/env sh -if ! command -v rofi > /dev/null -then - exec /usr/bin/dmenu "$@" -fi +main() { + if [ -n "$WAYLAND_DISPLAY" ] + then + exec fuzzel --dmenu "$@" + fi -exec rofi -dmenu "$@" + if [ -n "$DISPLAY" ] + then + if command -v rofi > /dev/null + then + exec rofi -dmenu "$@" + fi + + exec /usr/bin/dmenu "$@" + fi +} + +main "$@" |