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
178a58253a
wayland: implement set_monitor (untested)
2020-02-08 10:10:58 +02:00
Jari Vetoniemi
b4fc82a3aa
curses: fix list indent with scrollbar
2020-02-08 00:25:08 +02:00
Jari Vetoniemi
bb7db3e2b7
cairo/curses: dmenu like indent for lists
...
Fixes #72
2020-02-08 00:22:52 +02:00
Jari Vetoniemi
1c487ba808
cairo: make scrollbar 1 character thick
2020-02-07 23:53:46 +02:00
Jari Vetoniemi
9110c7c42e
x11: set window class and name
...
class is always bemenu, name is whatever is the title of the menu
2020-02-07 23:31:41 +02:00
Jari Vetoniemi
f8d025b350
x11: whitespace
2020-02-07 23:31:33 +02:00
Jari Vetoniemi
bc584cc5f0
menu: make SHIFT_RETURN handling more elegant
...
Don't handle this on client side. Instead have a filter item and return
it if filter text is requested.
2020-02-07 21:54:13 +02:00
Jari Vetoniemi
4534cc8c73
menu: whitespace
2020-02-07 21:53:56 +02:00
Jari Vetoniemi
fcce2e019a
menu: left/right now moves always cursor
...
Use SHIFT + left/right to move selection
2020-02-07 18:28:48 +02:00
Jari Vetoniemi
7af8c09f10
cairo: don't draw < if there's no items displayed
2020-02-07 18:22:35 +02:00
Jari Vetoniemi
c4856d784b
cairo: always have space for < at single line mode
2020-02-07 18:19:56 +02:00
Jari Vetoniemi
42eca37688
cairo: add cursor
2020-02-07 18:15:34 +02:00
Jari Vetoniemi
e7d6562046
cairo: useless memsets
2020-02-07 18:15:24 +02:00
Jari Vetoniemi
f04c5c458a
cairo: use inline instead of attributes
2020-02-07 17:05:10 +02:00
Jari Vetoniemi
a53189314f
cairo: remove whitespace
2020-02-07 17:03:33 +02:00
Jari Vetoniemi
ac9790b059
Fixes and docs from osx
2020-02-07 23:35:01 +09:00
Jari Vetoniemi
acb24be411
ignore_ret warns on clang *sigh*
2020-02-07 16:23:52 +02:00
Jari Vetoniemi
5a4d364d50
Nuke CMake from existance
...
Welcome glorious GNU Makefile
2020-02-07 16:03:08 +02:00
Jari Vetoniemi
9ff670f349
Fix gcc warnings
2020-02-07 13:05:15 +02:00
Jan Staněk
2f45c191bc
Mark global wayland constant extern
...
Without `extern`, the changed lines are not declarations,
but "tentative definitions"
(according to GCC man page, option `-fcommon`).
When specified in a header file
that is included in more than one `.c` file,
these result in linking failure unless `-fcommon` is specified.
GCC 10 changed the default from `-fcommon` to `-fno-common`,
and as such the previous code no longer links properly.
With `extern`, these lines are considered declarations,
and the linking proceeds successfully.
2020-02-06 17:35:20 +01:00
Jari Vetoniemi
7170c93f3a
menu: reset cursor at end on set_filter
2020-02-03 17:43:46 +09:00
Jari Vetoniemi
1607215d70
Extra whitespace
2020-02-03 17:26:17 +09:00
Jari Vetoniemi
88bd960718
CMake: Compile renderers after exports
2020-02-03 17:21:19 +09:00
sleich
9ac860b817
Add Ctrl-[ shortcut to x11 and wayland
...
Ctrl-[ shortcut is used to quit bemenu. It already works with ncurses backend
2020-01-08 04:47:57 +03:00
Michael Vetter
0f6e1625b5
Rename stdscr to stdscreen to prevent collision
...
On my system I get:
```
[ 3s] cd /home/abuild/rpmbuild/BUILD/bemenu-0.3.0/build/lib/renderers/x11 && /usr/bin/cc -DPANGO_DISABLE_DEPRECATED -D_GNU_SOURCE -Dbemenu_renderer_x11_EXPORTS -I/home/abuild/rpmbuild/BUI
LD/bemenu-0.3.0/build/lib -I/home/abuild/rpmbuild/BUILD/bemenu-0.3.0/lib/renderers/.. -I/home/abuild/rpmbuild/BUILD/bemenu-0.3.0/build/lib/renderers/x11 -I/usr/include/cairo -I/usr/include/g
lib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/uuid -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/inc
lude/fribidi -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -DNDEBUG -Wall
-Wextra -Wno-variadic-macros -Wno-long-long -O2 -g -DNDEBUG -fPIC -std=c99 -o CMakeFiles/bemenu-renderer-x11.dir/xkb_unicode.c.o -c /home/abuild/rpmbuild/BUILD/bemenu-0.3.0/lib/renderers
/x11/xkb_unicode.c
[ 3s] [ 55%] Building C object lib/CMakeFiles/bemenu.dir/3rdparty/cdl.c.o
[ 3s] cd /home/abuild/rpmbuild/BUILD/bemenu-0.3.0/build/lib && /usr/bin/cc -D_GNU_SOURCE -Dbemenu_EXPORTS -I/home/abuild/rpmbuild/BUILD/bemenu-0.3.0/build/lib -O2 -Wall -D_FORTIFY_SOURCE
=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -DNDEBUG -Wall -Wextra -Wno-variadic-macros -Wno-long-lo
ng -O2 -g -DNDEBUG -fPIC -std=c99 -o CMakeFiles/bemenu.dir/3rdparty/cdl.c.o -c /home/abuild/rpmbuild/BUILD/bemenu-0.3.0/lib/3rdparty/cdl.c
[ 3s] In file included from /usr/include/ncurses.h:60,
[ 3s] from /home/abuild/rpmbuild/BUILD/bemenu-0.3.0/lib/renderers/curses/curses.c:14:
[ 3s] /home/abuild/rpmbuild/BUILD/bemenu-0.3.0/lib/renderers/curses/curses.c:27:13: error: field '_nc_stdscr' declared as a function
[ 3s] 27 | WINDOW *stdscr;
[ 3s] | ^~~~~~
[ 3s] /home/abuild/rpmbuild/BUILD/bemenu-0.3.0/lib/renderers/curses/curses.c: In function 'terminate':
[ 3s] /home/abuild/rpmbuild/BUILD/bemenu-0.3.0/lib/renderers/curses/curses.c:97:19: error: lvalue required as left operand of assignment
[ 3s] 97 | curses.stdscr = NULL;
[ 3s] | ^
[ 3s] /home/abuild/rpmbuild/BUILD/bemenu-0.3.0/lib/renderers/curses/curses.c: In function 'render':
[ 3s] /home/abuild/rpmbuild/BUILD/bemenu-0.3.0/lib/renderers/curses/curses.c:190:28: error: lvalue required as left operand of assignment
[ 3s] 190 | if ((curses.stdscr = initscr()) == NULL)
[ 3s] | ^
```
`man stdscr` sais: "Upon initializing curses, a default window called stdscr, which is the size of the terminal screen, is created.".
So it seems for some reason there happens a collision here.
Let's rename the window so this doesn't happen.
2019-12-27 14:47:06 +01:00
Jari Vetoniemi
fedb1b0ab0
Use monospace 10 instead of fixed 9 by default
...
Matches the dmenu default, monospace instead of font name is more
robust.
2019-12-19 16:58:59 +02:00
Linus Heckemann
03c54c1d4b
scaling: require scale > 0
2019-11-05 12:59:37 +01:00
Adrian Müller
1f1aebf26a
Handle HiDPI scaling on Wayland
2019-11-05 10:13:34 +01:00
Sauyon Lee
c081cf7609
Add C-g shortcut to x11 and wayland
2019-07-13 00:46:18 +01:00
Alyssa Ross
93cde4831b
bemenu: add --line-height / -H option
...
Text is displayed vertically centered in a line. If unspecified, or 0,
the previous behaviour of making the height the size of the text, plus
two pixels on either side, is used, so there will be no change in
behaviour if this option is not used.
Fixes https://github.com/Cloudef/bemenu/issues/44 .
2019-05-31 23:20:54 +00:00
Jari Vetoniemi
f27e35eabc
Revert "Use x_LINK_LIBRARIES instead of x_LIBRARIES"
...
This reverts commit 620ae69020
.
2019-04-24 22:39:23 +03:00
Tobias Kortkamp
620ae69020
Use x_LINK_LIBRARIES instead of x_LIBRARIES
...
The libraries might not be in the linkers default search path, so
use absolute paths for them instead when using TARGET_LINK_LIBRARIES.
Note that XKBCOMMON_LIBRARIES is an alias for XKBCOMMON_LIBRARY and
already contains an absolute path.
Signed-off-by: Tobias Kortkamp <t@tobik.me>
2019-04-23 12:17:16 +02:00
Tobias Kortkamp
2ca0625a70
Depend on epoll-shim on FreeBSD/DragonFly
...
They do not natively support epoll(2) but require a library shim for it.
Signed-off-by: Tobias Kortkamp <t@tobik.me>
2019-04-23 11:45:13 +02:00
Tobias Kortkamp
312a606d54
Use epoll_create1() instead of epoll_create()
...
epoll_create() takes a size argument not a flag like EPOLL_CLOEXEC [1].
[1] https://linux.die.net/man/2/epoll_create
Signed-off-by: Tobias Kortkamp <t@tobik.me>
2019-04-23 11:41:03 +02:00
Ilia Bozhinov
31107243db
x11: add pango as dependency of the x11 renderer
...
We include the cairo rendering functions, which use pango.
2019-03-25 23:05:35 +01:00
Ilia Bozhinov
38069992ec
Add option to respect panel position ( #48 )
...
* implement option to make menu respect panel boundaries
* fixup! implement option to make menu respect panel boundaries
2019-03-25 23:21:17 +02:00
Jari Vetoniemi
b375ef8b0b
Merge pull request #46 from DanySpin97/master
...
Add options for renderers, make deps required
2019-03-25 10:52:24 +02:00
Danilo Spinella
5ca32626dc
Add options for renderers, make deps required
2019-03-25 09:44:45 +01:00
Ilia Bozhinov
ab82afab7f
wayland: implement a proper repaint cycle
2019-03-24 20:18:59 +01:00
Jari Vetoniemi
799d8b9d1d
Merge pull request #36 from ppascher/ppascher-patch-1
...
Fix wayland renderer lagging behind by 1 keystroke
2019-01-31 09:51:56 +02:00
v44r
3916772cec
Fix baseline when mixing ASCII and CJK characters
2019-01-29 19:30:45 +01:00
v44r
d3c43973c8
Limit line height to that of ASCII chars
2019-01-29 18:16:37 +01:00
v44r
6e34c3a923
Fix extra space below last item in vertical mode.
2019-01-28 14:53:16 +01:00
v44r
83a32e9b4c
Fix vertical alignment of text.
2019-01-28 13:14:44 +01:00
ppascher
ddc95d7b64
Fix wayland renderer lagging behind by 1 keystroke
...
When using the wayland renderer the entries according to the second to last keystroke where displayed while the actual selected entry matched the last keystroke.
This removes skipping the buffer change in bm_wl_window_render if window->frame_cb is not NULL.
2018-11-07 19:59:58 +01:00
Earnestly
b84ce02c7e
Fix overlapping when items have large glyphs
2018-10-31 19:53:01 +02:00
Dominique Martinet
3ae6ad7c48
wayland renderer: remove useless wl_surface_damage call
...
window->height is 0 at this point anyway...
2018-04-29 20:50:56 +09:00
Dominique Martinet
992e5add42
wayland renderer: Implement grab_keyboard
...
This avoids locking oneself out when running bemenu interactively,
as input would be grabbed too early without that and layer shell
does not allow to 'ungrab' focus by clicking on another window
2018-04-29 20:50:55 +09:00