On X11, not all programs offer this target, e.g. some terminals like
XTerm. The target "UTF8_STRING" has worked fine for many years and it is
what dmenu uses.
On Wayland, wl-paste supports the special type "text", which attempts to
autodetect a suitable type (in case there is no exact match for
"text/plain").
First, this behavior now matches that of dmenu. People switching over
from dmenu might be used to this.
I would argue, though, that it is more comfortable in general anyway:
The "primary" selection is often easier to access, you can just select
some text and be done with it, no need to reach for C-c (or even C-S-c
in terminals). Some programs like XTerm can't even put text into the
"clipboard" selection without special configuration. It thus makes sense
to make this selection available with a hotkey that's easier to reach (I
find C-y to be much more comfortable than C-Y). Only in rare
circumstances do I need to access the "clipboard" selection.
In practice, this change is *probably* not a (very) breaking change for
users, because you very often have to select some text first using a
mouse (thus putting it into the "primary" selection) before you can put
it into the "clipboard" selection using something like C-c. This means
that pasting from "primary" almost acts as a "magic" hotkey that does
"the right thing".
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 943d74600e.
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 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.
Running `printf "foo\nbar\n" | bemenu --filter foo` no results would
show up until something set the dirty state (like interacting with the
keyboard, e.g. deleting a character).
This would only happen on wayland, due to the render implementation not
considering the dirty state when the window was not yet created and then
just overwriting `menu->dirty` with `false`.
Signed-off-by: Robert Günzler <r@gnzler.io>