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

447 Commits

Author SHA1 Message Date
Jari Vetoniemi
192736c554 bump version to 0.6.4 0.6.4 2021-12-03 17:04:37 +09:00
jjtt
a6f362eda7 Instruction for installing dependencies 2021-11-24 05:14:22 +09:00
Andrei E
d593ab27b6 Close clipboard file 2021-11-04 09:01:29 +09:00
Andrei E
e1a016b8a0 Adapt code style 2021-11-04 09:01:29 +09:00
Andrei E
d6c58f5ea7 Document clipboard dependencies 2021-11-04 09:01:29 +09:00
Andrei E
0c9cfd029c Document paste functionality 2021-11-04 09:01:29 +09:00
Andrei E
00efc974d7 Add paste functionality 2021-11-04 09:01:29 +09:00
lunacb
cd41b1b52c add missing newline 2021-11-03 17:57:18 +09:00
lunacb
21ff4e47da fixed indentation 2021-11-03 17:57:18 +09:00
lunacb
a96ed87472 redesigned vertical alignment
single enum determines if the menu is at the top, in the center,
or at the bottom. implemented in wayland and x11 renderers.
2021-11-03 17:57:18 +09:00
lunacb
bddeea05b6 created margin option
-M or --margin option sets the horizontal margin of the window
2021-11-03 17:57:18 +09:00
Sergei Trofimovich
d31164db75 lib/renderers/curses/curses.c: always use "%s"-style format for printf()-style functions
`ncuses-6.3` added printf-style function attributes and now makes
it easier to catch cases when user input is used in palce of format
string when built with CFLAGS=-Werror=format-security:

    lib/renderers/curses/curses.c:234:9:
      error: format not a string literal and no format arguments [-Werror=format-security]
      234 |         mvprintw(0, 0, menu->title);
          |         ^~~~~~~~

Let's wrap all the missing places with "%s" format.
2021-11-03 17:57:06 +09:00
rei de vries
b7f8db7128 revert to single padding variable
but with height instead of ascii_height used as the box height
2021-10-07 00:32:25 +09:00
rei de vries
2eea64ad24 convert tab to spaces 2021-10-07 00:32:25 +09:00
rei de vries
9fcc611082 fix incorrect line height due to padding quantization 2021-10-07 00:32:25 +09:00
Stacy Harper
9b2a2cabf2 Add -s to disable title spacing on entries 2021-10-07 00:25:20 +09:00
Ben Brown
0589962d1c Add option to configure cursor height
If set to 0 (the default), the height of the cursor is set to the
height of the line (as is the current behaviour).
2021-08-27 04:01:13 +09:00
Stacy Harper
a42fa97a49 add -c center mode on wayland 2021-08-16 17:46:57 +09:00
Stacy Harper
a84eeb770e fix scaling caused issue on window redimension on wayland
This caused issue when using the -b (bottom) and -l (line) arguments on
scaled outputs.

When using a scaled output, the set_size use a wrong value as height.
We generated a scalled buffer so we used a scale x too high size.

We just have to divide the scaling to use a good size.
2021-08-15 13:27:58 +09:00
Jari Vetoniemi
eb41286593 bump version to 0.6.3 0.6.3 2021-07-22 09:11:41 +09:00
Tuyen Pham
32aa05789e add contrl-c to exit 2021-07-22 09:05:41 +09:00
Bilal Elmoussaoui
cac68880c1 flatpak: the action already uploads artifacts 2021-07-09 11:25:08 +09:00
Jari Vetoniemi
377015193d flatpak: give bemenu-run ro access to host fs 2021-07-08 12:58:50 +09:00
Jari Vetoniemi
b36a617fae ci: flatpak building 2021-07-08 00:41:19 +09:00
Jari Vetoniemi
e0e85e3eac flatpak: add recipies
For people who like to use flatpak, or have hard time building the thing
otherwise.
2021-07-08 00:41:19 +09:00
Tuyen Pham
81195da11c wayland: respect sway's keyboard rate settings 2021-07-06 10:29:47 +09:00
Maximilian Bosch
702a04c374 Ignore hidden files in bemenu
On most systems it's fairly uncommon to have hidden files within
`$PATH`, but in case of NixOS this is fairly regularly the case as we
have the convention to add `foo` and `.foo-wrapped` to a `bin`-directory
if `foo` is supposed to be a wrapper which sets e.g. env-vars for the
program.

These `.foo-wrapped`-executables are almost never needed, but are shown
in `bemenu` right at the start, so I modified the selection code to skip
hidden files which is also what `dmenu` does for instance.
2021-06-11 01:29:17 +09:00
Jari Vetoniemi
6a7341683e bump version to 0.6.2 0.6.2 2021-06-09 09:20:23 +09:00
Jari Vetoniemi
752ab983d1 make: -fPIC static libs that link to shared libs 2021-06-09 09:12:57 +09:00
Jari Vetoniemi
ca6b903415 curses: revert alt detection
This seems to be broken at least on some terminals and the high bit
toggle corrupts input. In addition there was printf for the esc/alt key
detection that can break the UI.

Neovim seems to have noncompatible way of detecting alt, so I think
neovim should be looked for proper way for handling this.
2021-06-07 16:30:12 +09:00
Bill Doyle
69d030573c Handle multiple seats (more) correctly
Previously, any seat without a keyboard could destroy our selected
keyboard. Now, select by seat instead and only destroy the keyboard if
it vanishes from that seat. This isn't actually multi-seat support, but
at least it will allow bemenu to accept input.
2021-06-06 23:31:57 +09:00
Thomas Weißschuh
44958c3a9b pkgconfig: set include path for header file 2021-05-25 17:49:04 +09:00
Jari Vetoniemi
9898036891 release 0.6.1 0.6.1 2021-05-23 14:14:35 +09:00
Jari Vetoniemi
fa9dcee2e4 make: use bemenu-$(VERSION) as tarball prefix 2021-05-23 14:12:13 +09:00
Robert Günzler
a81c80f81f wayland: update wlr-layer-shell-unstable-v1 protocol
Signed-off-by: Robert Günzler <r@gnzler.io>
2021-05-22 04:12:59 +09:00
Robert Günzler
4612f9d327 wayland: Allow showing the menu on the focused monitor
This adds an alias 'focused' for selecting the current monitor, which
becomes the default on x11 and wayland. The previous wayland default of
displaying on all outputs moves under '-2' or 'all'.

ref: https://github.com/Cloudef/bemenu/issues/102#issuecomment-604562234

Signed-off-by: Robert Günzler <r@gnzler.io>
2021-05-22 04:12:59 +09:00
Jari Vetoniemi
f23597ded0 release 0.6.0 0.6.0 2021-05-20 12:02:33 +09:00
Jari Vetoniemi
d5683f3633 ci: add actions for CI and release automation 2021-05-20 11:33:53 +09:00
Jari Vetoniemi
4b7b483bd6 cairo: fix gnu_printf format warning 2021-05-07 23:50:45 +09:00
Jari Vetoniemi
dd276c0a15 curses: fix build for OSX 2021-05-07 23:43:11 +09:00
Jari Vetoniemi
203d79e063 curses: fix bad format string for draw_line 2021-05-07 23:40:56 +09:00
Jari Vetoniemi
ebd7338bd5 s/cairo/cairo_renderer/ and fix cairo include
The documented canonical include for cairo is #include <cairo.h>
2021-05-07 23:38:15 +09:00
Sören Tempel
c8b4efcd79 man: update documentation to reflect revised handling of -m 2021-04-27 14:24:02 +09:00
Sören Tempel
934aa6fbb9 client: make sure the monitor index defaults to -1
This ensures that the menu spawns on the current monitor by default when
using X11 or on all monitors when using Wayland.
2021-04-27 14:24:02 +09:00
Sören Tempel
2e922503e8 x11: Align -m argument interpretation with dmenu
With dmenu, monitor indices start at 0 and a value of -1 (the default)
is used to spawn dmenu on the current monitor. While bemenu strives to
be compatible with dmenu, bemenu monitor indices previously started at 1
and a value of 0 (the default) was used to spawn on the current monitor.

This commit aligns the behaviour of bemenu's x11 backend with dmenu. For
this purposes, the affected code in the x11 backend is synced with the
current dmenu implementation. While doing so the monitor type has also
been switched from a uint32_t to a int32_t.
2021-04-27 14:24:02 +09:00
Thomas Weißschuh
9f2ad2dde0 List projects using bemenu in README.md
See #168
2021-04-26 23:23:47 +09:00
Sören Tempel
1475c3ce45 client: improve stripping of getline(3) newline
The previous version of this code operated under the assumption that
getline(3) lines are always \n\0 terminated. Unfortunately, this is not
the case as readline will return input which is not terminated with a
newline character if EOF is reached before encountering this newline. In
these cases, the code would falsely strip the last character. As an
example, consider the following bemenu invocation:

	printf foo | ./bemenu

This would start bemenu with `fo` instead of `foo` as a menu item. This
commit fixes this edge case and also hardens the loop body a bit by only
entering it if getline wrote more than zero characters to the buffer.
2021-04-04 19:03:52 +09:00
Sören Tempel
38395e92c7 client: use getline(3)
Not sure why the code didn't use this function previously, but
getline(3) is mandatory since POSIX.1-2008 and should thus be supported
by all maintstream operating systems. The proposed changes make the code
easier to read and should also make it more efficient memory-wise as it
does not necessarily cause the entire input to be copied into memory at
once.
2021-04-04 17:45:04 +09:00
Stephen Gregoratto
92bc5329ca Rewrite manpage
- Much of the existing text was reworded for better understandability.
- The new manpage uses mdoc(7) for better formatting.
  Because of this, we can merge bemenu and bemenu-run into a single
  file.
2021-04-01 19:07:07 +09:00
Kian Kasad
6ba3000fba add 'Usage' section to man page with keybindings 2021-03-29 16:03:49 +09:00