1
0
mirror of https://github.com/Cloudef/bemenu synced 2024-11-23 01:12:01 +01:00
Commit Graph

586 Commits

Author SHA1 Message Date
Peter Hofmann
62154d8e7b Clipboard: Make both selections available and fix inconsistencies
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.
2024-06-16 15:50:52 +09:00
Jari Vetoniemi
1c3eeb09d5 nix: update default.nix
* reduce src fileset to avoid unneccessary rebuilds
* test symbol visibility
2024-04-02 19:07:45 +09:00
Jari Vetoniemi
d58c9dc365 Bump version to 0.6.21 0.6.21 2024-03-13 11:28:12 +09:00
Andrei E
c0c608cad7 Move SIGCHLD to client launch 2024-03-09 23:46:46 +09:00
Andrei E
9a7b736dd9 Remove SIGCHLD handler
SIG_DFL on SIGCHLD prevents proper functioning of pclose, which the new version of the pasting functionality requires.

Closes Cloudef#385

Ref: https://stackoverflow.com/questions/54189212/popen-returns-1-unexpectedly
2024-03-09 23:46:46 +09:00
Jari Vetoniemi
fab01c9906 Bump version to 0.6.20 0.6.20 2024-03-07 17:51:45 +09:00
Julian Orth
6bcffe408c wayland: bind to zwlr_layer_shell_v1 version 3
zwlr_layer_shell_v1_destroy is not available in version 2 of the
interface.
2024-03-07 17:41:43 +09:00
Colin
cf72e2aa44 document vim bindings 2024-02-26 22:10:08 +09:00
Anskrevy
52b23d8fb5 Fix use after free in wayland.c 2024-02-17 14:24:11 +09:00
ldev
34259c5da7 removed workaround for bug and added extra case for XKB_KEY_ISO_Left_Tab 2024-02-08 11:13:54 +09:00
Anskrevy
a3f19bab9b Fix mouse press being ignored on x11 2024-02-05 12:52:51 +09:00
Jari Vetoniemi
6c531b4d2a Bump version to 0.6.19 0.6.19 2024-02-02 21:05:50 +09:00
Jari Vetoniemi
d93acb0e84 Revert "wayland: force window->scale = 1, if BEMENU_SCALE"
This reverts commit aac7d73afcbd34f1662e994d235d9ee0eb98065a.
2024-02-02 21:04:56 +09:00
Jari Vetoniemi
e77ca88c83 Bump version to 0.6.18 0.6.18 2024-02-02 18:41:37 +09:00
Jari Vetoniemi
aac7d73afc wayland: force window->scale = 1, if BEMENU_SCALE
BEMENU_SCALE is global override for whatever buffer scaling mechanism
there might be
2024-02-02 18:37:00 +09:00
Jari Vetoniemi
291d58a849 wayland: put fractional scaling behind env var
seems to fail on hyprland at least for now
2024-02-02 18:35:21 +09:00
Willow Barraco
877ca82cc1 Reapply "implement wayland fractional scaling"
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.
2024-02-02 18:13:22 +09:00
Jari Vetoniemi
3156dac7d4 wayland: cairo/wl scale are different concepts
Sepearate BEMENU_SCALE from wayland's buffer scale
2024-02-02 17:22:01 +09:00
Jari Vetoniemi
826b8953ed wayland: unused parameter 2024-02-02 14:58:52 +09:00
Jari Vetoniemi
80d904c534 wayland: set buffer scale before everything else 2024-02-02 14:57:30 +09:00
Jari Vetoniemi
943d74600e Revert "implement wayland fractional scaling"
This reverts commit b1439df42c70c9add91926aa4b7ab06a0f86adbf.
2024-02-02 14:40:40 +09:00
Jari Vetoniemi
36bb77b9ac wayland: use the correct scale render operates on 2024-02-02 14:35:33 +09:00
Jari Vetoniemi
af9fa0d105 wayland: remove unneccessary commit and roundtrip 2024-02-02 14:34:42 +09:00
Jari Vetoniemi
7a65abf52b x11: allow backend to be forced 2024-02-02 14:34:42 +09:00
Jari Vetoniemi
55e5aec8d5 Add flake.nix, make default.nix callPackageable 2024-02-02 14:34:42 +09:00
Willow Barraco
b1439df42c implement wayland fractional scaling 2024-02-02 13:26:28 +09:00
Willow Barraco
b9efebde1d fix: buffer is not divisible by scale X
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.
2024-02-01 10:16:08 +09:00
Jari Vetoniemi
ec6d7f9cdf Bump version to 0.6.17 0.6.17 2024-01-27 23:53:56 +09:00
MithicSpirit
a2c0441861 feat: C-b to go left
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.
2024-01-21 14:43:51 +09:00
Consolatis
d671226856 wayland: ensure bemenu is shown on top of fullscreen windows
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
2023-12-16 14:50:12 +09:00
Pablo Arias
f82eda732f add option to start vim bindings in normal mode 2023-12-02 23:24:20 +09:00
Lucas Merritt
b0751f7ddc Wayland support
Add necessary functions for Wayland upwards list mode to work.
2023-11-21 13:39:18 +09:00
Lucas Merritt
46c3f76a7d Styling and behavior fixes
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).
2023-11-21 13:39:18 +09:00
Lucas Merritt
432753bfe9 Upwards list support(X11)
Add upwards list support for X11, as well as refactor/improve some
drawing code and flags.
2023-11-21 13:39:18 +09:00
Peter Hofmann
5b75b2c93a Fix fallback to xclip
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.
2023-11-21 13:36:53 +09:00
Willow Barraco
4ee128c086 chore: minor variable rewording 2023-11-21 13:34:57 +09:00
Willow Barraco
62657f8f28 fix: wayland mmap failed on Sway 1.8.1
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.
2023-11-21 13:34:04 +09:00
Willow Barraco
c22cc64bdb Wayland: fix monitor and scaling detection
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.
2023-11-05 17:29:20 +09:00
Willow Barraco
eb92e7b39d flatpak: bump version 2023-11-05 17:29:20 +09:00
Lucas Merritt
6ea2ed2cfe Update help/usage to add cursor background and foreground colors.
Cursor background and foreground colors were previously documented in
the man page, but not in help/usage.
2023-10-09 08:42:26 +09:00
Lucas Merritt
da41b831c1 Single-instance and multi-instance modes
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.
2023-10-09 08:42:02 +09:00
Lucas Merritt
d913466050 Password flag parameters with indicator option
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.
2023-10-09 08:41:40 +09:00
gesellkammer
a04dea3dc4 break long string into parts 2023-09-28 17:31:06 +09:00
gesellkammer
4131791aef add auto-select to man page 2023-09-28 17:31:06 +09:00
gesellkammer
fa0461c847 new flag --auto-select, mirrors the behaviour of rofi's own -auto-select flag:
when there is only one option left during selection it is automatically
selected and the menu exits.
2023-09-28 17:31:06 +09:00
gesellkammer
266344471b fix --accept-single option 2023-09-28 17:31:06 +09:00
Jari Vetoniemi
407cb769c1 bump version to 0.6.16 0.6.16 2023-08-30 00:18:22 +09:00
Jari Vetoniemi
45fee1488d filter: fix exact matching 2023-08-30 00:05:22 +09:00
Jari Vetoniemi
200f545283 nix: default.nix 2023-08-30 00:04:51 +09:00
Robert Günzler
5e5f7c58d2 man: document filter
Signed-off-by: Robert Günzler <r@gnzler.io>
2023-07-12 20:31:33 +09:00