Commit graph

65 commits

Author SHA1 Message Date
Dave Davenport
494550d38d [ThemeParser] Add CSS color names support
* [ThemeParser] Add css color names

* Add CSS color support (WIP)

* Parse color names in the lexer.

* Add test for css color names

* Indent and fix ordering
2017-05-15 22:46:33 +02:00
Dave Davenport
fb11b8ceb6 [Test,Helper] Add test for utf8_strncmp and fuzzy evaluate. 2017-05-01 09:07:22 +02:00
Dave Davenport
fb318f0ff8 Cleanups, fix arguments mismatch 2017-04-23 15:17:15 +02:00
Quentin Glidic
9a68b22009
Fix licenses headers
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-04-15 12:32:05 +02:00
Dave Davenport
3f4d58ef53 Indent code. 2017-03-04 19:41:06 +01:00
Dave Davenport
dc7e4aa96e Install some headers for use in plugins 2017-02-17 14:06:31 +01:00
Dave Davenport
f7b4bebb9b Rename token_match to helper_token_match. 2017-02-17 09:58:47 +01:00
Dave Davenport
8f4a4d51c6 Don't apply fonts that don't result in family name or have size 0.
Issue: 554
2017-02-03 09:54:18 +01:00
Moritz Maxeiner
6b9dc1d081 Combi mode: Bang mode prefixes with len>1 (#542)
* Combi mode: Bang mode prefixes with len>1

This is required to match on modes that share a prefix.
Let 'power' and 'pass' be such modes for the following explanation:
Previously, only the first character of after the bang was compared,
so '!p' would always be matched to the 'pass' mode and there was no
way to limit selection in combi mode to the 'power' mode.
Now we can use prefixes of arbitrary length following the bang
such as '!po' (matches 'power' mode), or '!pa' (matches 'pass' mode).
Prefixes of length 1 are unchanged compared to the previous
behaviour, i.e. '!p' will still match 'pass'.

* Combi-mode prefixes should be utf-8 aware
2017-01-26 19:46:46 +01:00
Dave Davenport
0ebd6a260b Add auto-detect option to DPI setting. 2017-01-21 12:58:52 +01:00
Dave Davenport
19b023b221 Split sorting option. one for sorting. One to force levenshtein. 2017-01-11 09:42:37 +01:00
Dave Davenport
4452b08288 Move fzf matcher into helper 2017-01-11 09:20:19 +01:00
Dave Davenport
713d41f619 Allow matching highlighting to be set. Fixes #522 2017-01-09 00:09:02 +01:00
Dave Davenport
c57e7348d2 Add some better error message. Allow -theme-str option to override part of theme 2017-01-08 16:09:24 +01:00
Dave Davenport
b1a44cc65e Update code documentation 2016-11-15 21:54:31 +01:00
Dave Davenport
ce341f6885 Document more headers. 2016-10-14 16:46:54 +02:00
Dave Davenport
b4c599f022 Add more documentation.
Current state: 61% coverage.
2016-10-14 08:47:21 +02:00
Dave Davenport
20e55e1e4e Add fuzzy matching, make a -matching option.
* -matching *method* option instead of -regex, -glob, -fuzzy.
 * Re-add fuzzy matching pattern.
 * When there are substrings in regex, only highlight those matches.

Fixes: #447
2016-08-25 21:17:58 +02:00
Dave Davenport
ef3c773097 Constness. 2016-08-24 00:39:56 +02:00
Dave Davenport
4be25abad7 Fix some doxygen warnings. 2016-07-29 08:32:34 +02:00
Dave Davenport
77a0800ccf Copy memory instead of mixing malloc and g_malloc'ed memories (and freeing them all with g_free) 2016-06-21 22:40:42 +02:00
Dave Davenport
0e86050db8 Fix combi mode 'bang' behaviour, improve levenshtein with combi 2016-05-26 08:39:33 +02:00
Dave Davenport
498fadc735 Remove the is_ascii mess. 2016-05-22 17:47:34 +02:00
Dave Davenport
8091558ed8 Go Regex Go 2016-05-21 10:37:23 +02:00
Dave Davenport
c8a6b26607 First try at highlighting match (regex only) 2016-05-10 18:02:23 +02:00
Dave Davenport
e54e012500 Issue: #381: Try to handle X11 input and UTF-8 better.
In window_get_text_prop do conversion when input is of type STRING. (latin1) to utf8.
Dmenu: don't skip invalid lines, but try to display as much as possible.
Window mode: Double check all input from X.
2016-04-10 12:05:34 +02:00
Dave Davenport
7d046a1f5b Pack magic externs into a xcb_stuff. 2016-03-01 18:11:55 +01:00
Dave Davenport
a4fd907fe8 Run indenter 2016-02-28 15:32:53 +01:00
Dave Davenport
4c661c3932 Move most of window modi to xcb 2016-02-27 22:55:47 +01:00
Dave Davenport
6e3bb506de Full mainloop madness 2016-02-19 19:50:48 +01:00
Dave Davenport
504e27f701 Add some doxygen sugar. 2016-01-07 08:54:24 +01:00
Dave Davenport
d661a515f0 Make levenshtein sort utf8 aware and obey case sensitive setting.
- Add tests.
        - Use Glibs unichar for comparison.
2016-01-04 17:18:49 +01:00
Dave Davenport
0ff0f15264 Add test, remove whitespace 2015-12-08 08:39:18 +01:00
Dave Davenport
e4c7fe8f1e Fix func. def in wrong header file. 2015-12-02 17:56:25 +01:00
Dave Davenport
4b77a1728d Remove custom code, replace by glib, fix fuzzy matching for unicode.
- Also fixes char endianess issues.
2015-12-01 22:09:34 +01:00
Dave Davenport
8c9b72f34e Start at fixing Issue 273, this might break some things.
* Only use get_display_data for displaying. (Except the select complete (ctrl-space), this needs fixing).
 * Fix possible race condition in parallelization.
 * Fix small bug in case-sensitive handling. (beware for collision in keybinding)
 * Keep less lists around.
2015-11-21 23:59:59 +01:00
Dave Davenport
aeaceb154a Add experimental regex support 2015-11-17 16:10:14 +01:00
QC
93b6b83fb9 Try todo some validation of monitor size/padding in config sanity check. 2015-10-18 13:40:39 +02:00
Tom Hinton
af6a4b83eb Make normal filtering of plain ASCII lines faster
This patch adds a field lines_not_ascii to the MenuState structure. The
nth entry is 0 unless the nth member of MenuState.lines has a non-ascii
codepoint in it.

All comparison functions (menu_match_cb type) take an additional
argument to tell them if the thing they are matching is not_ascii. They
can use this to determine whether to collate and case-fold the
input (for non-ascii strings), or whether to use strstr/strcasestr (for
ascii strings).

The change is not currently implemented for flex matching, due to my
laziness. However, it should be a simple enough matter to add.

For my large input of 400,000 lines, this reduces typical filtering time
to about ten microseconds from about 2 seconds.
2015-10-01 12:16:41 +01:00
Tom Hinton
574bf2da82 Make dmenu reading very marginally faster
A slight reduction in use of realloc and avoidance of 3 or 4 strlens for
a string we know the length of
2015-10-01 11:41:44 +01:00
QC
b18d68eff2 Adjust new editor width 2015-09-19 12:57:48 +02:00
QC
89dcb5be1e Remove unused function 2015-08-29 11:57:04 +02:00
Dave Davenport
8d6a78939c Small cleanup + fail more gracefull here and there 2015-07-30 08:57:09 +02:00
Qball Cow
2bbd589f0d Add prefix to header guard. #191 2015-07-27 10:17:12 +02:00
Dave Davenport
8104997e6f Bug #191 rename header guard to not use reserved macro name. 2015-07-27 09:22:21 +02:00
Dave Davenport
98b8e583cb Make fuzzy matching available everywhere: #133 (-fuzzy) 2015-07-01 09:12:22 +02:00
Dave Davenport
30743d1789 Move fuzzy_token_match to where it can be reused. 2015-06-28 13:53:37 +02:00
QC
354ccdd94d Fix Issue #164 2015-05-16 13:58:09 +02:00
QC
9ff5a615e9 Add combi viewer.
Use by adding combi to the list of enabled modi.
2015-03-30 20:12:22 +02:00
QC
b21368c005 OO-ify the Switchers. 2015-03-27 20:28:53 +01:00