eww
eww copied to clipboard
[FEATURE] Auto-focus for input widget
Description of the requested feature
Many people including me use eww to create an app launcher. Those app launchers use an input widget to search through the desktop files. An auto-focus option for the input widget would be useful to automatically set keyboard focus to it as soon as its get visible so you can start typing right after opening the launcher instead of having to first click on the input widget to focus it.
Proposed configuration syntax
:auto-focus true
Additional context
No response
You can achieve this feature by setting :focusable true
in wayland or :windowtype "dialog"
in x11, ej:
(defwindow launcher
:monitor 0
:stacking "fg"
;;;; this for x11
:windowtype "dialog"
;;;; or this for wayland
:focusable true
:geometry (geometry
:width "430px"
:height "600px"
:anchor "center"
)
(app_launcher)
)
and then using a keybing to open/close the launcher, ej in hyprland:
bind = $mainMod, R, exec, eww open launcher --toggle
I'm already using :windowtype: dialog
on X11 and :focusable true
also didn't work on Wayland when I tested it. I still have to click the input field first to focus it. I use bspwm on X11 and tested it with Hyprland on Wayland. This is my config, the window is called apps
.