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
Harley Swick
e74224a406
Use -m option for setting monitor name and monitor + cleanup
2021-02-05 16:53:43 +09:00
Robert Günzler
52547807b0
support hiding filter input ( #150 )
...
* support hiding filter input
"password mode"
Signed-off-by: Robert Günzler <r@gnzler.io>
2021-02-05 13:12:48 +09:00
Peter Colberg
1dfa72b8bc
Fix missing definition for bm_menu_add_item_at
...
The function was declared in bemenu.h but defined using a different name.
2020-12-13 17:10:41 +09:00
Peter Colberg
38c2958573
Declare filter_dmenu_fun as static
...
This is an internal function that should not be exported from the library.
2020-12-13 17:10:07 +09:00
Peter Colberg
a9cee36e85
Support compilation with -fvisibility=hidden
...
When using a compiler with support for GNU C extensions (GCC, Clang),
explicitly mark functions shared across library boundaries as visible.
This is the default visibility and has no effect when compiling with the
default CFLAGS. When compiling with -fvisibility=hidden, however, this
exports only functions marked BM_PUBLIC and hides all others.
https://gcc.gnu.org/wiki/Visibility
This facilitates packaging for distributions that track shared library
symbols, e.g., Debian, which uses a symbol file to provide the minimal
version associated to each symbol exported by a library.
https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#the-symbols-system
https://manpages.debian.org/unstable/dpkg-dev/dpkg-gensymbols.1.en.html
2020-12-13 17:09:44 +09:00
Julian Mehne
7523af7d18
Add --filter option.
2020-11-15 11:30:03 +09:00
fancycade
4cbc0343c3
Document keybindings in README
2020-10-17 16:40:12 +09:00
fancycade
1bd40d0a44
Add key_pending field to sync wayland keyboard event loops
2020-10-10 16:22:07 +09:00
Jari Vetoniemi
c0fa954881
fix the version to 0.5.0
...
Sanity this in future against git tag.
2020-08-28 21:02:30 +09:00
Dominic Monroe
64c38dde50
Add custom key support
2020-08-28 21:01:22 +09:00
Peter Colberg
20661aed78
Drop CMakeLists.txt for curses renderer
2020-08-23 09:41:47 +09:00
Jari Vetoniemi
65cea5e20a
cairo: add BEMENU_SCALE env variable
...
Allows overriding the scaling factor for bemenu
2020-06-29 00:12:20 +09:00
Jari Vetoniemi
7266ebb795
cairo: fix hidpi rendering
2020-06-29 00:06:19 +09:00
Jari Vetoniemi
7b7cbf6ba0
man: document the new scrollbar option
2020-06-28 23:28:03 +09:00
Daniel Lublin
5387677720
Add --scrollbar none
...
Useful in aliases or scripts to override a previously enabled scrollbar
on the commandline.
Also correct documentation of bm_scrollbar_mode.
2020-06-15 15:09:42 +09:00
Jari Vetoniemi
d9f4d1bb12
cairo: don't draw left scroll indicator if empty
...
If there are no matches the left indicator would be still drawn as black
box. If filter string is long enough, this black box would cover part of
the filter string.
2020-05-08 12:20:35 +03:00
Jari Vetoniemi
116cb5479f
make: do not break the documented make/install way
...
also use cp / mkdir for compatibility
2020-05-07 14:54:09 +09:00
Jari Vetoniemi
474e7c0965
make: osx uses install_name instead of soname ...
2020-05-07 14:48:22 +09:00
Jari Vetoniemi
d5ad43bae5
make: use -soname, instead of -soname=
2020-05-07 14:47:42 +09:00
Ivy Foster
f47d753135
GNUmakefile: add individual install rules for each renderer
...
This eases split packaging as suggested in
https://github.com/Cloudef/bemenu/issues/79#issuecomment-572867783
2020-05-07 14:34:23 +09:00
Tuomas Siipola
bdfc2aac84
menu: fix delete on multi-byte characters
2020-04-19 15:16:14 +03:00
Tuomas Siipola
33cec5cff6
cairo: fix cursor position on multi-byte input
...
`pango_layout_index_to_pos` expects byte index
2020-04-19 15:16:14 +03:00
Jari Vetoniemi
b6e8762e2e
bugfix release 0.4.1
2020-04-13 12:30:57 +03:00
Jari Vetoniemi
f51f13a028
make: wayland-client dependency for protocols
2020-04-13 12:29:53 +03:00
Jari Vetoniemi
6343a658bb
wayland: support showing bemenu on all monitors
2020-03-25 19:16:57 +02:00
Cole Helbling
cd53b7bb55
x11,wayland: treat keypad enter as normal enter
2020-03-19 09:23:32 +02:00
Jari Vetoniemi
fdcf8e9b39
make: fix soname
2020-03-17 12:03:53 +02:00
Bill Doyle
6350a4000d
Add transparency support ( #96 )
...
Add transparency support
2020-03-16 11:41:42 +09:00
Matthew Thode
f888a0306f
add soname to shared libraries
...
Found in Gentoo QA
* QA Notice: The following shared libraries lack a SONAME
* /usr/lib/libbemenu.so.0.4.0
Signed-off-by: Matthew Thode <mthode@mthode.org>
2020-03-16 04:39:17 +02:00
Jari Vetoniemi
1873f7460f
make: install include file as well
2020-02-27 13:59:43 +09:00
Corey Hinshaw
42ba51857d
Add no-exec option to bemenu-run
2020-02-23 01:41:50 +09:00
MrSorcus
15f96d2d23
Fix typo.
2020-02-12 23:14:26 +09:00
Jari Vetoniemi
467ac971d1
bemenu: reuse the calculated buffer end
...
Also assert that we don't overflow on realloc
2020-02-11 10:23:33 +02:00
Jari Vetoniemi
a89799a6b5
bemenu: fix null termination of input
2020-02-11 10:19:57 +02:00
Earnestly
ba30c39cd9
Update GNUmakefile
2020-02-10 05:36:33 +09:00
Earnestly
3f28c34be2
Update GNUmakefile
2020-02-10 05:36:33 +09:00
Earnestly
c1b687aea5
Don't attempt to chmod everything under PREFIX
...
Fixes #90
2020-02-10 05:36:33 +09:00
Jari Vetoniemi
2a1e54994a
make: don't track wayland-protocols xml
...
Sadly there is no way to lazily evaluate the prerequsite in rule,
so the pkg-config expansion will always get expanded and throws error
even when you are not compiling wayland.
2020-02-09 18:51:55 +02:00
Jari Vetoniemi
e78e241a6a
make: better clean for osx shenigans
2020-02-09 07:22:16 +02:00
Jari Vetoniemi
2187fa8157
bemenu-run: no argument for --fork
2020-02-08 14:01:18 +02:00
Jari Vetoniemi
56231f8119
bemenu-run: add --fork option
...
Make terminal backends not fork by default.
Use this option to fork again on curses.
For non terminal backends this option is no-op.
2020-02-08 13:21:36 +02:00
Jari Vetoniemi
b688425bf3
menu: fix custom selection
2020-02-08 12:48:15 +02:00
Jari Vetoniemi
6b3b71b19a
README/man: update documentation
...
Add missing environment variables to man pages.
Prefer the word backend instead of renderer in human speech.
2020-02-08 12:25:06 +02:00
Jari Vetoniemi
b322e50798
make: support out-of-git builds
...
E.g. releases would be these with git archive and such.
2020-02-08 12:05:41 +02:00
Jari Vetoniemi
9295dc0016
make: track version from file, implement GIT_SHA1
...
We track the version from file, so the targets depending on version will
be rebuilt. We also track .git/index, so library and renderers get
rebuilt for new BM_PLUGIN_VERSION on each commit.
2020-02-08 11:48:41 +02:00
Jari Vetoniemi
1f2b831976
README: note about testing from source
2020-02-08 11:31:06 +02:00