Commit Graph

165 Commits

Author SHA1 Message Date
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
239259aebf Unfortunately we can't test curses on cronjob 2014-04-13 03:15:18 +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
83d67f80c0 Handle -l option by ignoring it 2014-04-13 01:26:53 +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
Martin Langasek
8e1ff89f9c Fix typo in Mainpage.dox 2014-04-12 23:05:12 +02: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
27b71db67a Add TODO about options. 2014-04-12 22:15:46 +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
cd73a1ba61 Read items from stdin nicer (assumes stdin can fit on one buffer) 2014-04-12 19:21:40 +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
fc08cb9cff Dmenu outputs input text, if no matches were found. 2014-04-12 14:38:42 +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