Commit Graph

559 Commits

Author SHA1 Message Date
Jari Vetoniemi
ec6d7f9cdf Bump version to 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 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
Robert Günzler
d7ef1f3310 Apply initial filter before evalutating accept-single
Follow up to 0a44fb65cdc052aeb53ee05ede05ac77ad2d2a0d
Which didn't actually result in the intended behavior of skipping all
menu interaction when `accept-single` is true and the initial filter
results in a single item.

This has the side effect that `ifne` now evaluates on the filtered items
as well.

Signed-off-by: Robert Günzler <r@gnzler.io>
2023-07-12 20:31:33 +09:00
ItsProfessional
c9b891e89b Add option to exit bemenu using esc in vim binds normal mode 2023-06-30 09:31:45 +09:00
inglorion
f92da7b438 docs: Add missing items to manpage
--fixed-height
--accept-single
--ifne
-c, --center
-B, --border
-R, --border-radius
--ch
--cw
--hp
--bdr
2023-05-29 11:28:05 +09:00
Adam Stück
68bce75ecd docs: add missing option
Add documentation for the --fixed-height option
2023-05-20 06:45:14 +09:00
Jari Vetoniemi
752be280a8 bump version to 0.6.15 2023-05-08 21:19:04 +09:00
Damien Tardy-Panis
9e075fa30c Fix required tab indentation in man page 2023-05-08 21:18:13 +09:00
Damien Tardy-Panis
879ae38766 Fix uninitialized pointer and touch structs in run_menu
Fixes #338
2023-05-08 21:18:13 +09:00
Moyu Su
8e2fd06f70 fixed that respond of Escape while using Vim binding under Wayland 2023-03-13 21:57:18 +09:00
Willow
0c0107e8cb
Fix: select last entry if pointer/touch above last index (#332)
* Fix: select last entry if pointer/touch above last index

* Select first line if pointer/touch above title bar
2023-02-22 16:07:57 +09:00
Willow
f53310a961
Fix: invisible right border. (#333) 2023-02-22 10:56:17 +09:00
Leonardo Eugênio
1f0a47b359
Fix Makefile to support submodule setups (#329) 2023-02-18 18:33:20 +09:00
Lucas Merritt
d9ac320dd0
Add fixed height option(Addresses #270) (#326)
* added fixed height option && fixed counter
2023-02-18 18:30:55 +09:00
Daniel
8644540fa4
docs: add missing options (#331)
* docs: add missing options

* docs: use tabs
2023-02-18 18:30:03 +09:00
Lucas Merritt
77000a680c
Add Match/Page Counter(Addresses #204) (#325)
* counter with total item count

* filtered item counter

* optimized display code

* refactored overcomplicated code

* fixed warnings that failed Ubuntu test

* fixed inconsistent state

* CLI option for counter

* fixed vertical mode counter
2022-12-27 17:13:59 +09:00
Lucas Merritt
a1374d487e fixed minor issues 2022-12-21 14:10:08 +09:00
Lucas Merritt
30379a88bf somewhat working, maybe fix background colors 2022-12-21 14:10:08 +09:00
Jari Vetoniemi
809c58866b bump version to 0.6.14 2022-12-16 09:15:13 +09:00
Robert Günzler
0a44fb65cd Apply initial filter before evaluating accept-single
This lets us select fully non-interactive if we have a perfect match

Signed-off-by: Robert Günzler <r@gnzler.io>
2022-12-16 09:13:19 +09:00
Robert Günzler
516a2ab069 common: actually parse -F using getopt
Signed-off-by: Robert Günzler <r@gnzler.io>
2022-12-16 09:13:19 +09:00
Robert Günzler
778617e7c9 wayland: don't chomp dirty state when window is pending
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>
2022-12-16 09:13:19 +09:00
Quint Guvernator
a295e24146 improve exit code docs 2022-11-21 23:58:29 +09:00
Jochen Sprickerhof
b132d018a5 Make pkg-config configurable
Needed for crossbuilds.
2022-10-29 07:06:21 +09:00
Luca Nimmrichter
0c2bc885a1 Replace char *key_binding with an enum 2022-10-21 03:17:29 +09:00
Luca Nimmrichter
a8c89c41a7 Fix remaining crashes 2022-10-21 03:17:29 +09:00
Luca Nimmrichter
75afebeb4b Remove debug logs 2022-10-21 03:17:29 +09:00
Luca Nimmrichter
4d00e04eaa Update README with vim keybindings 2022-10-21 03:17:29 +09:00
Luca Nimmrichter
197936e697 Add new bindings
H/M/L to goto first/mid/last item in view
X to delete character before the cursor
v to toggle item selection

Change goto first item from g to gg
2022-10-21 03:17:29 +09:00