Mikkel Oscar Lyderik
c1a0974849
Update xdg-shell.xml from wayland-protocols
...
Updates xdg-shell.xml to version 5.
2016-03-18 12:39:25 +01:00
Jari Vetoniemi
c3abc43860
curses: Use set_escdelay when available
2015-09-23 18:56:34 +03:00
Jari Vetoniemi
c4a553796f
CMake: Use absolute libdir instead
2015-09-23 18:52:59 +03:00
Tomáš Čech
25218f98fa
Check explicitly for Xinerama
...
Xinerama doesn't need to be present even when base X11 is. Check it
explicitly.
2015-09-22 00:29:33 +02:00
Tomáš Čech
556961648b
Look for renderers on right location
2015-09-21 22:18:14 +02:00
Tomáš Čech
ecd7d4056f
Respect install destinations set by variables
...
Use CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_INCLUDEDIR as destination
base.
2015-09-21 21:48:45 +02:00
Mark Oteiza
0874fc5d49
Add some Emacs keybindings
...
* C-v to curses backend
* C-v, M-v, M-<, M-> to x11 and wayland backends
Signed-off-by: Jari Vetoniemi <mailroxas@gmail.com>
2015-04-06 23:22:12 +03:00
Jari Vetoniemi
d8097c44dd
Make renderers try detect whether they are in correct env.
2015-03-09 09:53:57 +02:00
Jari Vetoniemi
bf5fd83491
Fix mac os x build
2015-02-02 12:25:56 +02:00
Jari Vetoniemi
98f44cbb78
Handle build-time dependency checking better, so you can compile bemenu
...
without wayland or x11 easier.
2015-01-30 03:16:04 +02:00
Jari Vetoniemi
e53e77bf05
Allows -l 1
2015-01-20 18:43:44 +02:00
Jari Vetoniemi
eb46ba7bdc
Remove bg color option as you never see the real bg anyways.
2015-01-20 18:42:29 +02:00
Jari Vetoniemi
7d019e767b
Bind alt+h and alt+l as well
2015-01-18 04:51:02 +02:00
Jari Vetoniemi
41e9000dd6
Add math library linkage
2015-01-18 04:42:09 +02:00
Jari Vetoniemi
bd6051073d
Swap j-k
2015-01-18 04:35:26 +02:00
Jari Vetoniemi
c04a2c4192
Change scrollbar to represent content instead of index.
2015-01-18 04:23:18 +02:00
Jari Vetoniemi
92152cb5fb
Add alt keybindings from demenu to gui backends
2015-01-18 03:34:18 +02:00
Jari Vetoniemi
c2eabf2be1
Make scrollbar autohideable
2015-01-18 02:07:30 +02:00
Jari Vetoniemi
f2eaf599f6
Change default scrollbar style and make colors configurable
2015-01-18 01:38:25 +02:00
Jari Vetoniemi
9c541d0b42
Add --scrollbar option
2015-01-18 01:08:10 +02:00
Jari Vetoniemi
074b2d1b58
Remove --backend and --prioritory options, change prioritory -> priorty
...
and provide BEMENU_BACKEND env variable. Change API to reflect this
change.
There is no reliable way to detect when running on terminal (especially
when stdin is a pipe), so we need to make curses backend explicit with
BEMENU_BACKEND=curses or bm_menu_new("curses"), otherwise GUI backend
will be choosed automatically.
2015-01-17 18:53:29 +02:00
Jari Vetoniemi
b32b8db523
Newline
2015-01-17 18:53:22 +02:00
Jari Vetoniemi
f76cfbca4f
Get rid of _DEFAULT_SOURCE #defines, set this in cmake and also use
...
secure_getenv where it makes sense.
2015-01-17 18:52:21 +02:00
Jari Vetoniemi
6ac8d8c4d8
Change font functions to function on pango style font descriptions instead of size
...
and name.
2015-01-17 15:25:50 +02:00
Jari Vetoniemi
ada6edc175
Add X11 renderer.
2015-01-16 01:59:09 +02:00
Jari Vetoniemi
0cd1c991d2
Take monitor height into account again.
2015-01-16 01:48:47 +02:00
Jari Vetoniemi
2bf8bbfcde
Working pango code.
2015-01-15 22:18:23 +02:00
Jari Vetoniemi
9baca87123
Basic pango.
2014-11-23 21:20:03 +02:00
Jari Vetoniemi
20189fb8d2
Fatal on busy buffers.
2014-11-05 21:43:25 +02:00
Jari Vetoniemi
2c9451c2b8
Check that getppid != 1
2014-11-05 21:43:12 +02:00
Jari Vetoniemi
a90bf2f512
Redraw only when input changed.
2014-11-02 07:58:45 +02:00
Jari Vetoniemi
e8fc51d80c
Get output width and height.
2014-11-02 07:58:34 +02:00
Jari Vetoniemi
dfda59ad18
Better list margin.
2014-11-02 06:59:07 +02:00
Jari Vetoniemi
0d5cdc2c96
Key repeats.
2014-11-02 06:48:53 +02:00
Jari Vetoniemi
ee3c41f162
Make shift + tab the current tab behavior, and normal tab to cycle.
2014-11-02 04:08:40 +02:00
Jari Vetoniemi
674a2a1ac2
Make right/left arrow scroll list on single line mode.
2014-10-26 17:52:00 +02:00
Jari Vetoniemi
4f2d73070c
Cleanup cairo drawing.
2014-10-26 17:49:12 +02:00
Jari Vetoniemi
ac692bb485
Add small margin to left when drawing with cairo.
2014-10-26 15:52:04 +02:00
Jari Vetoniemi
a44b001e82
Mkae highlighted item prefix configurable.
2014-10-26 15:42:09 +02:00
Jari Vetoniemi
fb6a49e690
Use real font height for window height.
2014-10-26 15:41:53 +02:00
Jari Vetoniemi
64c4bbdf98
Cleanup all resources used by wayland renderer.
2014-10-25 22:16:31 +03:00
Jari Vetoniemi
b391bbe608
Use cleanable buffer for curses renderer.
2014-10-25 22:16:20 +03:00
Jari Vetoniemi
660f832fad
Cleanup init.
2014-10-25 22:16:09 +03:00
Jari Vetoniemi
ba03036a39
Store item pointer before removal.
2014-10-25 21:54:03 +03:00
Jari Vetoniemi
c1bdca9cc4
Use sizeof(void*) and fix list remove.
2014-10-25 21:53:48 +03:00
Jari Vetoniemi
d799bbd246
Close when connection is broken.
2014-10-25 21:12:55 +03:00
Jari Vetoniemi
595ff4f687
Use dprintf
2014-10-25 20:43:31 +03:00
Jari Vetoniemi
d3db039136
Single line mode, color customization, etc..
2014-10-25 20:02:34 +03:00
Jari Vetoniemi
b03cd1ea53
Use BM_PLUGIN_VERSION for renderers.
2014-10-25 16:39:39 +03:00
Jari Vetoniemi
3f5e21a83f
Cleanup wayland renderer and plugin support.
2014-10-25 01:38:30 +03:00
Jari Vetoniemi
f8d97efb8f
Install wayland renderer as well.
2014-10-23 02:20:34 +03:00
Jari Vetoniemi
c98fcc5100
Add wayland renderer (experimental)
2014-10-23 02:11:35 +03:00
Jari Vetoniemi
6ebdb0030a
Only compile curses renderer if curses was found.
2014-10-23 02:10:22 +03:00
Jari Vetoniemi
df396986b1
vsnprintf is null terminated.
2014-10-23 02:09:52 +03:00
Jari Vetoniemi
20c1b5d04f
Use get_wch
2014-10-23 01:33:12 +03:00
Jari Vetoniemi
fa9c421b77
No longer true.
2014-10-22 23:33:06 +03:00
Jari Vetoniemi
0abad19b3e
Pass bm_menu struct on each render api call.
2014-10-22 23:10:11 +03:00
Jari Vetoniemi
0b02230935
Call constructor of activated renderer.
2014-10-22 22:52:14 +03:00
Jari Vetoniemi
014c20099d
Refactor code to snake_style, turn renderers into plugins, and start
...
wayland (cairo) renderer.
2014-10-22 22:46:51 +03:00
Jari Vetoniemi
33aedfe237
Skip whitespace when tokenizing too.
2014-08-21 02:10:56 +03:00
Jari Vetoniemi
536eee6d0b
Skip leading whitespace.
2014-08-21 01:45:52 +03:00
Jari Vetoniemi
4ce638eb3a
Length check is fragile and breaking behaviour.
2014-05-14 20:50:32 +03:00
Jari Vetoniemi
953c61f4ad
Support older ncurses.
2014-04-15 20:34:21 +03:00
Jari Vetoniemi
8e415197d2
This is not used
2014-04-15 20:31:10 +03:00
Jari Vetoniemi
88590ddcfe
Don't use the enumerator variable.
2014-04-15 20:14:42 +03:00
Jari Vetoniemi
f77ae857b1
It's better to guard whole function.
2014-04-15 20:07:47 +03:00
Jari Vetoniemi
cf27013c1d
Print the missing function and from what library in case of exception.
2014-04-15 20:06:51 +03:00
Jari Vetoniemi
5556779dd2
Consistency.
2014-04-14 21:18:50 +03:00
Jari Vetoniemi
7533cebfe5
Tell curses to use terminal default colors
2014-04-14 19:33:50 +03:00
Jari Vetoniemi
617c4ab827
Add selection wrapping (-w).
2014-04-14 19:25:16 +03:00
Jari Vetoniemi
4f72d188ad
Fix documentation.
2014-04-14 19:25:04 +03:00
Jari Vetoniemi
bcda540401
Hide title if more than NCOLS
2014-04-14 19:14:30 +03:00
Jari Vetoniemi
9df8716cb8
Handle window resize.
2014-04-14 19:11:26 +03:00
Jari Vetoniemi
5b873de2de
Better input scroll logic.
2014-04-14 19:00:15 +03:00
Jari Vetoniemi
066c5c2e61
Make sure text fits tightly terminal + simplified logic
2014-04-14 19:00:03 +03:00
Jari Vetoniemi
f410a5e391
Make sure the text is null terminated.
2014-04-14 18:10:01 +03:00
Jari Vetoniemi
0f34b70c90
Move this check before allocation.
2014-04-14 18:08:13 +03:00
Jari Vetoniemi
850a8335d5
Flush input buffer after showing menu first time.
2014-04-13 04:16:23 +03:00
Jari Vetoniemi
66a6f08c8a
vsnprintf is not on same headers on darwin.
2014-04-13 03:23:11 +03:00
Jari Vetoniemi
c2bed7689d
Enable cursor (hidden when launched by vim)
2014-04-13 03:00:34 +03:00
Jari Vetoniemi
9c0b25f6a9
Enable noecho and raw mode.
2014-04-13 02:47:54 +03:00
Jari Vetoniemi
60c1ab88cc
Store old actions to seperate actions.
2014-04-13 01:39:31 +03:00
Jari Vetoniemi
fc6539c101
Buffer as format is dangerous, this functions seems to be VA one.
2014-04-13 01:22:49 +03:00
Jari Vetoniemi
5251ef6ac0
Fix bad syntax, and add defgroup for library.
2014-04-13 00:12:31 +03:00
Jari Vetoniemi
7da3ebe423
Scrollable curses input \o/
2014-04-12 23:58:01 +03:00
Jari Vetoniemi
d22612899a
Curses really does not like tabs.
2014-04-12 23:21:43 +03:00
Jari Vetoniemi
f722f247fc
Xterm does not feed S+pgup/pgdown but does so for Ctrl combination
2014-04-12 23:20:53 +03:00
Jari Vetoniemi
994d6074bc
Stop assuming filter is static array anymore.
2014-04-12 23:09:35 +03:00
Jari Vetoniemi
3f0f507e4f
Improve CMakeLists and make stuff installable.
2014-04-12 22:42:37 +03:00
Jari Vetoniemi
06972a3579
CLI interface, aka option parsing.
2014-04-12 22:12:44 +03:00
Jari Vetoniemi
01ff5f48ed
The list will be copied now.
2014-04-12 20:56:00 +03:00
Jari Vetoniemi
ab54f2bc07
Here be dragons comments.
2014-04-12 20:55:45 +03:00
Jari Vetoniemi
f03e03cdd9
Make filter to pointer.
2014-04-12 20:52:29 +03:00
Jari Vetoniemi
5599e1aa8e
Store tmp to tokv in for loop, so we can free it if something fails.
2014-04-12 20:52:01 +03:00
Jari Vetoniemi
6692f73c5c
Meh, no (null) it's empty if it's empty.
2014-04-12 20:51:32 +03:00
Jari Vetoniemi
bfc53136c8
Add print attribute and fix warning it catched.
2014-04-12 20:21:40 +03:00
Jari Vetoniemi
d54381f009
Fix out of bound access, and provide better tokenize api.
2014-04-12 20:16:33 +03:00
Jari Vetoniemi
e738ae1772
Discard unprintable single width characters instead.
2014-04-12 19:59:58 +03:00
Jari Vetoniemi
57e76dda1c
Cleanup header includes.
2014-04-12 19:59:45 +03:00
Jari Vetoniemi
311e4b3676
Use strcspn instead of strtok
2014-04-12 19:59:21 +03:00
Jari Vetoniemi
042448798d
Add more keybindings to curses interface.
2014-04-12 18:44:52 +03:00
Jari Vetoniemi
3ad042c625
S-Return (C-t, insert in curses) should return input, C-Return is mark. (C-r, C-space in curses)
2014-04-12 18:44:03 +03:00
Jari Vetoniemi
ad4e0425a6
Make page scrolling work like it should. (Shfit+pgup/pgdwn for old
...
behaviour)
2014-04-12 18:42:30 +03:00
Jari Vetoniemi
9e9b671fa3
Remove highlight logic from filters, it does not belong there.
...
Plus it seems dmenu always just highlights first item on filter change.
2014-04-12 14:36:12 +03:00
Jari Vetoniemi
544b1973c4
Why is this here? Remove commented memmove.
2014-04-12 14:16:25 +03:00
Jari Vetoniemi
f2608c3c64
Handle empty items.
2014-04-12 14:15:37 +03:00
Jari Vetoniemi
9d867bea0c
Sort results like dmenu does.
2014-04-12 12:56:34 +03:00
Jari Vetoniemi
471046d1b2
Make comparator functions follow standard more.
2014-04-12 12:55:05 +03:00
Jari Vetoniemi
058d8a98ed
Try ncursesw and then ncruses as fallback.
2014-04-12 11:15:22 +03:00
Jari Vetoniemi
29c34b0861
Consistency.
2014-04-12 00:01:06 +03:00
Jari Vetoniemi
46486abc64
Delete is emitted on mac terminal.
2014-04-12 00:00:39 +03:00
Jari Vetoniemi
5a0a2659ed
Cleanup dmenu filter.
2014-04-11 23:58:36 +03:00
Jari Vetoniemi
3c6e167578
Silly me, why not just get the highlighted item once..
2014-04-11 23:58:09 +03:00
Jari Vetoniemi
28a44b9e41
Add cast for conversion when type isn't unsigned.
2014-04-11 23:11:54 +03:00
Jari Vetoniemi
c82ebb768c
Support mac, duplicate stdin/stdout to make piping possible.
2014-04-11 23:09:01 +03:00
Jari Vetoniemi
48cf42f0c9
Buffer grown too much.
2014-04-11 02:02:11 +03:00
Jari Vetoniemi
cc93ff905f
Draw lines properly.
2014-04-11 01:59:50 +03:00
Jari Vetoniemi
40bd036c53
Free the old list.
2014-04-11 01:59:05 +03:00
Jari Vetoniemi
dfdb810099
This is actually better without the count check.
2014-04-11 00:40:21 +03:00
Jari Vetoniemi
590c5d9f85
Undef get_wch
2014-04-10 23:50:55 +03:00
Jari Vetoniemi
8e0dd1ab39
Make it possible to set filter text manually.
2014-04-10 23:05:37 +03:00
Jari Vetoniemi
71beb7583f
Make it possible filter manually, and optimized filtering.
2014-04-10 23:05:13 +03:00
Jari Vetoniemi
45e2117159
Don't run filtering if there is no filter.
2014-04-10 22:15:01 +03:00
Jari Vetoniemi
45502a2fd9
Proper filtering functions.
2014-04-10 22:02:47 +03:00
Jari Vetoniemi
05212f5e44
Improve documentation.
2014-04-10 20:19:15 +03:00
Jari Vetoniemi
49fc7cd08c
Include index parameter in documentation.
2014-04-10 20:12:42 +03:00
Jari Vetoniemi
9525c77f55
Setter first, then getter.
2014-04-10 20:11:41 +03:00
Jari Vetoniemi
702d808b28
Make it possible to set and get userdata pointers.
2014-04-10 20:09:34 +03:00
Jari Vetoniemi
a6d0413b97
Implement list structure, and feature for multiple selections.
2014-04-10 20:04:06 +03:00
Jari Vetoniemi
e874818889
Cleanup curses better.
2014-04-10 20:01:34 +03:00
Jari Vetoniemi
8631506d9d
Update documentation, include only public API in doxygen output.
2014-04-10 17:26:42 +03:00
Jari Vetoniemi
78713f23ac
Document internal.h
2014-04-10 13:23:42 +03:00
Jari Vetoniemi
9a04c4a9a7
Document curses struct
2014-04-10 13:23:03 +03:00
Jari Vetoniemi
d53c91393d
Fix bmMenuRunWithKey documentation
2014-04-10 13:08:38 +03:00
Jari Vetoniemi
e230f03e54
Fix bmMenuRender documentation
2014-04-10 13:08:26 +03:00
Jari Vetoniemi
04dede1f96
Remove unused internal function.
2014-04-10 12:07:23 +03:00
Jari Vetoniemi
ff8ad3a804
Remove @file from non-public library files.
2014-04-10 11:08:10 +03:00
Jari Vetoniemi
722af2f7a0
Clarify which enums the functions are mapped to.
2014-04-10 11:07:37 +03:00
Jari Vetoniemi
efc5781aec
Consistency
2014-04-10 10:57:37 +03:00
Jari Vetoniemi
956494767c
lolCase variables
2014-04-10 10:56:38 +03:00
Jari Vetoniemi
4d920ad9e4
Make asserts and ifs more consistent.
2014-04-10 01:41:32 +03:00
Jari Vetoniemi
cff1f37f97
Do curses refresh before endwin.
2014-04-10 01:31:22 +03:00
Jari Vetoniemi
2615c43dc0
Move side effects after cleanup.
2014-04-10 01:26:00 +03:00
Jari Vetoniemi
dd4bddcf98
Do bounds checking correctly.
2014-04-10 01:25:46 +03:00
Jari Vetoniemi
944e36b21d
Free filtered items.
2014-04-10 01:25:37 +03:00
Jari Vetoniemi
67be25fbe4
Basic working bemenu with curses backend
2014-04-10 01:10:05 +03:00
Jari Vetoniemi
92aa6367b8
These structs are not typedefs.
2014-03-28 22:14:13 +02:00
Jari Vetoniemi
13c470fb39
Remove unused function prototype.
2014-03-28 22:03:47 +02:00
Jari Vetoniemi
06c8bde93f
Provide BM_DRAW_MODE_LAST for enumerating draw modes.
2014-03-28 21:59:34 +02:00
Jari Vetoniemi
c609e4025e
Release renderer in bmMenuFree function.
2014-03-28 21:40:46 +02:00
Jari Vetoniemi
908749cfdf
Add basic API code.
...
=> bmMenu instancing.
=> "Rendering"
=> bmMenu releasing.
2014-03-28 21:35:32 +02:00
Jari Vetoniemi
1c511e30f5
Remove custom output directory paths.
2014-03-28 21:34:38 +02:00
Jari Vetoniemi
ff314f3c5e
Add project skeleton
2014-03-18 19:35:10 +02:00