Commit graph

313 commits

Author SHA1 Message Date
Dave Davenport
eab4e1438f Make dmenu use glib mainloop. 2016-01-26 08:38:07 +01:00
Dave Davenport
eadf455c8c Let DMenu mode reuse open dialog and not restart it. handy for multi-select. 2016-01-20 18:50:33 +01:00
Dave Davenport
d0716efe12 Refactor menu function into three parts, setup, itterrate and finalize. 2016-01-20 18:24:31 +01:00
Dave Davenport
ec24e4426e Fixing SardemFF7 Feedback: boolean, g_getenv and clear_error 2016-01-14 21:06:03 +01:00
Dave Davenport
98fdf04285 [RUN] UTF-8/locale conversion and sardem exec test. 2016-01-14 20:40:19 +01:00
Dave Davenport
121278e6d1 [DRUN] Expand path we get from Desktop file
* This is more 'free'  then spec. but does not break anything.

Fixes: #317
2016-01-14 17:42:07 +01:00
Dave Davenport
cc682f107b Update display value for modi (testing) 2016-01-12 22:18:10 +01:00
Dave Davenport
13810d5911 Add experimental 'password' mode. (#315) 2016-01-10 13:10:44 +01:00
Dave Davenport
c6a9de8c4a Use snprintf instead of sprintf 2016-01-09 19:25:03 +01:00
Dave Davenport
d7dab65e5b Making widget class, moving stuff around 2016-01-09 16:22:09 +01:00
Dave Davenport
dc8fb4f202 Start making SardemFF happy. Use g_return_if_fail 2016-01-08 09:16:59 +01:00
Dave Davenport
fa51aeb484 More splitting and abstracting. 2016-01-07 21:27:20 +01:00
Dave Davenport
e8daff0f6a First cleanup steps. 2016-01-07 19:47:37 +01:00
Dave Davenport
51b5511017 More doxygen sugar. 2016-01-07 16:01:56 +01:00
Dave Davenport
7f621a4a91 Replace strdup_printf with build_filename 2016-01-06 12:42:53 +01:00
Dave Davenport
c512f81c9c Update comments, replace printf/build_filename 2016-01-06 12:40:41 +01:00
Dave Davenport
81ea5fd8c6 Update documentation for ssh dialog 2016-01-05 21:19:30 +01:00
Dave Davenport
329f31bd75 Add doxygen target. 2016-01-05 19:49:13 +01:00
Dave Davenport
5a3c202423 Update copyright 2016-01-01 00:27:00 +01:00
Dave Davenport
696d0a2fa0 Fix 1 off memory leak 2015-12-23 17:03:00 +01:00
Dave Davenport
270ec0c14b Fix out of memory bound on array 2015-12-22 20:57:57 +01:00
Dave Davenport
8b82787df6 Fix possible issue with uninitialized data 2015-12-21 23:14:56 +01:00
Dave Davenport
04eebf964a Indent 2015-12-14 20:28:25 +01:00
Dave Davenport
541c653913 Improve matching for DesktopFile run mode 2015-12-14 20:25:36 +01:00
Dave Davenport
08d6d6b685 Fix return code multi-select 2015-12-12 20:54:59 +01:00
Dave Davenport
eaa553bfd5 Indent. 2015-12-03 22:48:30 +01:00
Dave Davenport
697abdfdfc [DMenu] Add option to read from file instead of stdin. 2015-12-03 18:22:13 +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
Qball Cow
ff52140697 Check for nil before updating. 2015-12-01 13:17:59 +01:00
Dave Davenport
544229d975 Issue #287 mark selected rows. 2015-11-30 14:05:39 +01:00
Dave Davenport
bf60d9c01c Fix return code 2015-11-28 11:59:11 +01:00
Dave Davenport
864a00b9fd Add option to dump filtered list to stdout.
uses format option and filter `-dump`.
2015-11-27 13:14:46 +01:00
Dave Davenport
2da1207b7d Fix issue #271 expand path. 2015-11-27 13:01:25 +01:00
Dave Davenport
3c411433b4 Big rename from Switcher to Mode internal, to match with user terminology 2015-11-25 09:26:38 +01:00
Dave Davenport
627643281d Fix ; in macro. 2015-11-24 22:53:40 +01:00
Dave Davenport
d1591273e7 Cleanups, rename and document. 2015-11-24 22:02:30 +01:00
Dave Davenport
00a555b685 Create more consistent ordering of arguments 2015-11-24 14:22:35 +01:00
Dave Davenport
6978b146f0 [Combi] only textual map, when not using glob/regex mode. 2015-11-24 14:14:55 +01:00
Dave Davenport
fa2bcd778c Fix for complete issue #273.
- Add complete handler.
2015-11-24 13:59:35 +01:00
Dave Davenport
cbba58914f Some cleanups and re-ordering of parameters to be consistent. 2015-11-23 22:15:27 +01:00
Dave Davenport
ad778b7dc1 Const making. 2015-11-23 22:15:27 +01:00
Qball Cow
84daf5fd6c Fix issue #285, clear memory on realloc 2015-11-23 17:11:12 +01:00
Dave Davenport
b974b10c96 [DRun] Skip entries that have NoDisplay set.
Closes issue #283
2015-11-23 09:47:29 +01:00
Dave Davenport
4510f65d5a textbox: advance cursor correctly for multi-char input
Thanks to eigengrau
fixes: #280
2015-11-22 20:41:45 +01:00
Dave Davenport
5bdcd47dde consts and small ensurance (though should be correct to begin with) 2015-11-22 00:33:26 +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
238a34162a Try to fix crasher on mixing glib free and free. 2015-11-15 13:12:43 +01:00
Dave Davenport
2eaffceada Fix printing. 2015-11-14 19:59:56 +01:00
Dave Davenport
56e85d0f5a Cleanup. 2015-11-14 19:42:43 +01:00
Dave Davenport
80e873c8a3 Add threadpool support, add optional timings compile flag 2015-11-14 13:47:45 +01:00
Qball Cow
311cedf87f Fix silly little bug. 2015-11-12 14:53:02 +01:00
Qball Cow
c7dcb4821a Use getdelim instead of custom fgets function. 2015-11-12 14:15:33 +01:00
Dave Davenport
09ab44bf92 Fix #264 fall back to age ordered list if stacked list does not work 2015-11-10 23:52:52 +01:00
Dave Davenport
195dc0fb01 Cleanups. 2015-11-07 12:59:08 +01:00
Dave Davenport
53e9332603 Fix #260. 2015-11-07 11:20:25 +01:00
Dave Davenport
4c8404f87d Fix combi and drun and localization 2015-11-03 19:57:07 +01:00
Dave Davenport
80ac118655 Put things together, making desktop menu work 2015-11-03 17:34:02 +01:00
Dave Davenport
6f404ddc8e Initial import desktop file runner. 2015-11-03 08:31:38 +01:00
Dave Davenport
b454791ccd Merge pull request #257 from klemens/no-parse-known-hosts
Add -no-parse-known-hosts option
2015-10-31 19:14:20 +01:00
Klemens Schölhorn
9cb0073ce8 Add -no-parse-known-hosts to disable parsing of ~/.ssh/known_hosts
For humans who like to keep the list of available servers clean. Also useful
if you use different names in ~/.ssh/config.

The previous default of always parsing known_hosts is not changed.
2015-10-31 18:35:37 +01:00
Dave Davenport
02b99e6f95 Fix: 256 Do not accept custom entry when not applicable.
Add test to reproducet .
2015-10-31 18:04:55 +01:00
Dave Davenport
f9e7bc0775 Possible fix for 256. Need test cases for these. 2015-10-31 17:31:24 +01:00
Dave Davenport
bc2b532a51 Add dmenu options to -h 2015-10-21 18:58:01 +02:00
Dave Davenport
64cb4c781c Fix some compiler warnings 2015-10-19 09:23:06 +02:00
QC
1b425c7bd0 Fix crash on deleting entries in ssh/run.
Fix bang for custom run.
2015-10-18 22:12:06 +02:00
Dave Davenport
4975704a05 Fix #244 Do not catch sigchld, let glib handle this internally
- TODO fix man page viewing.
2015-10-12 08:12:25 +02:00
QC
56e023dcee Remove unneeded check. 2015-10-11 14:13:08 +02:00
Tom Hinton
3ba2da9cae Fix mistakes from copy paste 2015-10-01 18:18:01 +01: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
Qball Cow
9b67838b56 Only cache successful run. (Thanks to Koppa nd daemoni) 2015-09-29 17:28:21 +02:00
Dave Davenport
ca8ff80a5c Add bang support to combi 2015-09-28 18:19:10 +02:00
QC
e8328beb2d Fix small leak 2015-09-26 21:06:36 +02:00
QC
8083753700 Fix #177 Add known host parsing. 2015-09-20 16:58:34 +02:00
QC
31fe5759b8 More line fixing. 2015-09-19 21:00:06 +02:00
QC
b18d68eff2 Adjust new editor width 2015-09-19 12:57:48 +02:00
QC
442e235c24 Some cleanups, tweak uncrustify. 2015-09-19 12:21:30 +02:00
Dave Davenport
a5c1eb1f1b Allow window mode to be disabled 2015-09-14 08:57:10 +02:00
Dave Davenport
d2aad68bce Keep the line matched (if possible) when filtering. 2015-09-08 22:23:03 +02:00
Dave Davenport
13203c9de7 Refactor to make dmenu use Switcher, and make menu func use this. 2015-09-08 21:41:54 +02:00
Dave Davenport
ae26c13daf Allow switchers to run multiple times. 2015-09-07 19:10:44 +02:00
Dave Davenport
092a2c5037 Issue: #224 test version window current desktop
run: rofi -show windowcd -modi windowcd,window

Using ctrl-tab you can switch between two modes (all windows, or just current desktop).
2015-09-07 17:41:48 +02:00
Dave Davenport
2c45c02c7f Small cleanup. 2015-09-03 08:20:08 +02:00
Dave Davenport
29d0c109cb Add WINDOW_TYPE_DESKTOP to ignore list.
Issue: #215
2015-08-31 08:00:23 +02:00
Dave Davenport
3c91c8d6e0 Issue: #213 hide windows marked as type DOCK
Removes i3 hack.
2015-08-27 21:09:12 +02:00
Dave Davenport
d9a9d2489a Add separator color and style option. 2015-08-26 18:11:53 +02:00
Thomas Adam
d676232846 NET_WM_DESKTOP: don't assume desktop zero is invalid
When checking the client's _NET_WM_DESKTOP state, if a client has a desktop
set, allow for desktop zero being valid; no need to add one to the result.
The specification allows for desktop zero.
2015-08-24 20:08:25 +02:00
QC
c170eae8c8 Issue: #207 add generic -filter mode. 2015-08-20 21:42:53 +02:00
Dave Davenport
1ca7141621 Add quick solution for #202, expose line-margin setting. 2015-08-04 09:42:14 +02:00
QC
1590151c46 -row -t -selected-row 2015-08-02 21:25:02 +02:00
QC
dbf992d756 Fix -l as alias for -lines (in dmenu mode) rename -l to -row 2015-08-02 21:24:07 +02:00
QC
8ca3c276c9 Change -i mode to match dmenu. Bug #200 2015-08-02 16:44:03 +02:00
QC
c97d2979e5 Bug #200, add '-b' method. 2015-08-02 15:50:06 +02:00
Dave Davenport
69c75971f3 Print error to stderr when fclose fails. 2015-07-31 10:21:32 +02:00
Dave Davenport
f8ed184415 Fix for #199, properly reset pointer to NULL after free'ing 2015-07-30 18:18:37 +02:00
QC
979a63d242 Fix not clearing of pointer after free-ing it. 2015-07-27 23:24:38 +02:00
Dave Davenport
fa5c36835d Allow escape to quit in no-custom mode 2015-07-23 18:19:20 +02:00
Dave Davenport
b3bc620211 Fix window matching. 2015-07-06 12:30:15 +02:00
QC
f88cfacfde Replace all qsorts. 2015-07-05 09:47:55 +02:00
Dave Davenport
98b8e583cb Make fuzzy matching available everywhere: #133 (-fuzzy) 2015-07-01 09:12:22 +02:00
Dave Davenport
c7ed92e40c Use tokenmatch in window_match. 2015-07-01 09:02:25 +02:00
QC
aaf9e1e345 Free in right order 2015-06-30 21:18:45 +02:00
Dave Davenport
30743d1789 Move fuzzy_token_match to where it can be reused. 2015-06-28 13:53:37 +02:00
QC
67089677b5 Fix naming 2015-06-27 22:38:06 +02:00
Dave Davenport
9977d7ef69 Fix fuzzy match to continue at next character. #133 2015-06-25 02:54:00 +02:00
QC
bcbb64f615 Don't do unneeded compares 2015-06-24 21:28:13 +02:00
QC
db1331ed66 Test implementation for #133. 2015-06-23 21:22:38 +02:00
QC
ce73f468ca Possible fix for #179 2015-06-20 15:11:30 +02:00
Dave Davenport
6c9a493b56 [SSH] Ignore comments in the Host: line.
Fixes #178
2015-06-14 14:37:53 +02:00
QC
bd9f4ebf07 More dmenu fixes (shift -enter on custom) 2015-06-11 21:20:09 +02:00
QC
a811011a1d Fix dmenu mode. 2015-06-11 21:07:25 +02:00
QC
d11c61cef1 Fixes #176 add mode that user expects. 2015-06-11 20:38:48 +02:00
Dave Davenport
1a188af2e9 Add markup support to error msg. 2015-06-08 23:23:33 +02:00
Qball Cow
00ffa9f148 Move comment to right place 2015-06-09 18:14:09 +02:00
Qball Cow
e5caaf9d1a Possible fix issue #175 2015-06-09 18:10:23 +02:00
QC
95beb58730 tiny cleanup 2015-06-05 23:08:02 +02:00
QC
a93aec02bd Add support for msg string with pango markup. 2015-05-23 20:06:06 +02:00
Qball Cow
09e4a64780 fix issue #165 2015-05-19 19:59:50 +02:00
QC
300234611d First fix for #164 2015-05-18 22:38:51 +02:00
QC
354ccdd94d Fix Issue #164 2015-05-16 13:58:09 +02:00
QC
14c50132c8 more small cleanups 2015-05-14 19:45:57 +02:00
QC
652a6ed7d2 Fix clang-tidy warnings. 2015-05-14 19:39:30 +02:00
Dave Davenport
22f35983c0 Add quote and escape string option. 2015-05-13 18:36:16 +02:00
Dave Davenport
8abf3335dc Remove silly test. 2015-05-12 21:59:51 +02:00
Dave Davenport
4d7b5a02d6 Cleanup and add d format 2015-05-11 23:20:34 +02:00
QC
9307a1668e Add -format option to dmenu. 2015-05-10 12:08:08 +02:00
QC
4d3b9e414d Small cleanup 2015-05-09 14:17:27 +02:00
Dave Davenport
89d2190f8e [#158] Patch implementing -only-match mode. 2015-05-07 21:07:15 +02:00
QC
13eee4571c Allow alt-1t/m9 be re-bound. 2015-05-05 19:30:43 +02:00
QC
a32bd61fea DMENU special return value starts at 10. Issue: #154 2015-05-04 10:37:50 +02:00
QC
8d4e1ee8fa Rasi patch, allowing special keys, modifying return value.
In dmenu pressing alt-[1-9 will return the selected entry and set the return value to the
        pressed number.
2015-05-03 13:04:03 +02:00
QC
d2eeffe2d9 Issue: #131 Prepend keybinding names with "kb-" 2015-05-02 12:01:06 +02:00
QC
61fc9e8310 Finish adding all different keybindings. Issue: #131 2015-05-02 11:53:27 +02:00
QC
99118420ea Support Levenshtein in dmenu.i #149 2015-04-16 21:13:45 +02:00
Dave Davenport
f64395e4e9 Remove unused code 2015-04-15 22:41:50 +02:00
QC
a38ddb3b06 Fix space. 2015-04-14 22:12:21 +02:00
QC
c9707b4c1b Leave out unmap hack for now. 2015-04-05 14:52:01 +02:00
QC
9b415e60a0 Fix crasher with fixed-lines off and 0 visible rows 2015-04-05 13:36:39 +02:00
QC
d6ced176d4 Add ranges for urgent active in dmenu mode. 2015-04-05 11:53:08 +02:00
QC
71cfb6d553 Allow urgent/active color to be set, add dmenu option -u/-a to highlight row. 2015-04-04 11:10:41 +02:00
QC
f2c4aff37c Add active/urgent color. 2015-04-03 18:40:07 +02:00
QC
957ffe5fcf Check WMHints for urgent hint 2015-04-03 18:01:03 +02:00
Dave Davenport
0ab7aa4bba Add italic support and use it for windows that demand attention (working?) 2015-04-02 22:23:17 +02:00
Dave Davenport
0d87cf12a3 Add combi viewer, where (selected) modi can be combined.
- Add active window highlighter.
2015-03-31 22:45:02 +02:00
QC
cf423fb2aa Remove printf 2015-03-30 20:23:41 +02:00
QC
42ae0a5871 Indent combi.c 2015-03-30 20:13:47 +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
55160c6eff Issue: #137, Parse /etc/hosts file. 2015-03-29 12:27:00 +02:00
QC
888260b06b Small cleanup 2015-03-27 20:50:48 +01:00
QC
b21368c005 OO-ify the Switchers. 2015-03-27 20:28:53 +01:00
Dave Davenport
f52b697dd4 Remove double names. 2015-03-25 08:36:19 +01:00
Dave Davenport
d290285a9f Fix rendering of boxes (margin and height) 2015-03-20 16:07:30 +01:00
Dave Davenport
eae9fe7f04 Avoid calling collate when not needed. 2015-03-20 08:45:24 +01:00
Dave Davenport
4fad02225e Cleanup argc/argv lugging around. 2015-03-11 18:32:37 +01:00
Dave Davenport
c89a272d4d Add number mode for dmenu (Request from Taharqa)
* option -i.
2015-03-11 18:07:54 +01:00
Dave Davenport
444d09b905 Update spell. 2015-03-05 20:26:52 +01:00
Dave Davenport
923dbb93ec Typo o rama. 2015-03-04 22:47:52 +01:00
Dave Davenport
da8902ac88 Replace signal by sigaction 2015-02-19 13:22:10 +01:00
Dave Davenport
d9db18266c Remove unused TIMING. 2015-02-19 13:11:39 +01:00
Dave Davenport
8b50e94fea Make compiler more picky.
Add -Werror=missing-prototypes
2015-02-18 08:53:38 +01:00
QC
4e55889223 Update indenting. 2015-02-12 22:34:33 +01:00
QC
877c8051c6 Update copyright license. 2015-02-12 22:34:06 +01:00
QC
c760432a6c Moving files around, dialogs in dialog directory. 2015-02-12 22:26:28 +01:00