Previously, C-y pasted the "primary" selection on X11 and the
"clipboard" selection on Wayland. That's inconsistent and confusing,
especially when you're switching back and forth between the two.
This commit does two things:
1. It makes C-y always paste the "clipboard" selection.
2. It adds a key bind C-Y to paste the "primary" selection.
I suspect that most bemenu users are on Wayland, so this commit tries to
not break things for them. It does, however, change the behavior on X11.
This reverts commit 943d74600eb3791f3fe8344a844e5bc6d17899bb.
This fix the BEMENU_SCALE that was left unused when fractionnal scale
support was detected.
This is rebased over origin/master.
To prevent this, we move where we set the buffer scale just after where
we attach the new buffer to the surface. It should make sure the buffer
scale, and the attached buffer stay consistent on the first commit.
This brings the keybinds more in line with readline/emacs-style
bindings. C-l to go left is preserved for backwards compatibility.
Notably, the curses backend already had C-b to go left, but did not
have C-l; it has not been changed.
Before this patch, wayland compositors that render fullscreen
windows between the top and overlay layers would show bemenu
behind an active fullscreen window. For other compositors
the z-rendering order was undefined.
This change ensures that bemenu will always be on top of other
usual windows (including fullscreen ones).
Fixes #81
Fix many issues with styling related to bemenu and the upwards list
mode. In addition to this, fix/modify some behavior to improve
this(ex: border_size and border_radius are now a double).
popen() returns NULL if the underlying fork() or pipe() fails, not if
the called program didn't run properly. The old code didn't actually
fall back to xclip on X11, it was never called.
To fix this, inspect the exit code of the programs that we run. We use
the output of the first program that exited cleanly.
CC #363.
Sway 1.8.1 does not trigger some event as surface.enter before we are
asked to render the first frame. This cause this first frame to be
rendered with wrong attributes.
This is solved with Sway master, precisely with commit:
> 7d2e4a51063ac90f950cb44f141ab391cbcaff5f
>
> layer-shell: enter output before surface is mapped
>
> This sends fractional-scale-v1 events before the first configure
> event. That way clients have all of the metadata they need to render
> the first frame.
To ensure we don't fails rendering the first frame, even if the
compositor does not provide metadata in a correct order, we initialize
the window structure with default values.
The whole management of monitor_name with the Wayland backend seems heavily
broken, and doesn't allow to (1) select the target output with -m, and (2) to
correctly detect the used output and use correct attributes.
When used with two monitors with different scale values, depending on
the output order, you get a blurry menu.
To fix this we attach a listener to wayland surfaces to store which outputs
it belongs to. This rewrite almost completly the "recreate_windows"
function.
This also drop completly the xdg-output-unstable-v1 protocol, cause v4
already add the "name" event to fetch the output name.
I did not pushed this to support v6, with the new
"preferred_buffer_scale" event, cause anyway we need to fetch the
output max_height.
Add flag and behavior for a forced single-instance mode.
Add XDG runtime directory possible selection and remove errx
Remove usage of errx and errno in the code, add the ability to select the XDG
runtime directory instead of /tmp for the bemenu lock file.
Add parameters to the password flag, add an option in this flag to
enable indicator mode(display asterisks instead of hiding or
displaying the filter text).
Man page and help flag fix
Add password flag details to the man page, fix the help flag slightly
for better password flag details.