Commit graph

1221 commits

Author SHA1 Message Date
Dave Davenport
d450d02ad6 For redraw when rofi_view_set_active is called. 2016-11-14 16:31:26 +01:00
Dave Davenport
fcf3c33415 Fix keybinding with Shift in name. Alt-Shift-S -> Alt-S. Alt-Shift-1 -> Alt-exclam
+ indent.
2016-11-14 16:25:04 +01:00
Dave Davenport
01751db4c0 Fix #498: Right count for unicode charaters in column code. 2016-11-14 12:39:37 +01:00
Dave Davenport
f0bc7e3185 Fix #485: Correctly remove consumed masks. 2016-11-14 08:28:54 +01:00
Dave Davenport
7cc90abceb [DMenu] Dump when there is an empty filter. 2016-11-13 23:15:13 +01:00
Dave Davenport
31a29e452b Fix #497: Create user runtime dir if not exists. 2016-11-12 11:36:39 +01:00
Dave Davenport
27cef3c9ae Fix #497: Create cache dir if not exists. 2016-11-12 11:28:40 +01:00
Dave Davenport
cd0fedd0db If no fake background failed to load, still paint a background. Add debug info. 2016-11-11 22:11:32 +01:00
Dave Davenport
1d40782515 Re-work the expose, redraw system. Use XServer side pixmaps to do drawing and flipping.
- By server side drawing and flipping buffer time to draw buffer to window speed up by factor 1000+.
   Flipping is now one xcb_copy_area call.
 - Don't abuse Xserver expose events to singal internal drawings.
 - Queue redraws in idle time.
 - Avoid unneeded redraws.
2016-11-11 16:29:59 +01:00
Dave Davenport
e3af1efaef Fix crash when clicked out of window. 2016-11-11 09:30:44 +01:00
Dave Davenport
0da5737cee If widget is disabled, don't check redraw flag as it wont be cleared.
This reduces a lot of false redraws caused by overlay widget.

Issue: #496
2016-11-10 12:17:27 +01:00
Dave Davenport
545be58e40 Issue #454 pass our window id along in the change active window request 2016-11-07 09:15:04 +01:00
Dave Davenport
90c314f397 Re-add column, but not for dmenu when prompt is set 2016-11-07 08:51:23 +01:00
Dave Davenport
da2e6a2cc4 Remove debug sleep 2016-11-06 16:55:41 +01:00
Dave Davenport
89e3e0e645 Grab keyboard as early as possible (#494) 2016-11-06 16:50:12 +01:00
Dave Davenport
0554db65ea Fix dmenu with -selected-row 2016-11-05 20:00:22 +01:00
Dave Davenport
ed6cb59b5d Fix crash on wrongly queued ViewState (thx to teto) 2016-11-02 18:24:20 +01:00
Dave Davenport
e72508b782 Remove opacity option. 2016-11-01 08:10:27 +01:00
Dave Davenport
4c5df96fcd Pull config option access from out of separator widget. 2016-11-01 08:04:39 +01:00
Dave Davenport
69c19afcfc [DRun] Fix free 2016-10-31 17:02:10 +01:00
Dave Davenport
3f577f917a Small re-indent 2016-10-31 15:51:47 +01:00
Dave Davenport
01e32c9c61 Cleanup some drun code, use hash table for seen check instead of two arrays 2016-10-31 08:44:04 +01:00
Dave Davenport
e3ab39ea6f add more details to timing log 2016-10-31 08:07:02 +01:00
Dave Davenport
f5f4f52957 Use strtok_r instead of strtok. 2016-10-30 10:14:32 +01:00
Dave Davenport
86b6beb1e9 Update some code. 2016-10-28 23:28:49 +02:00
Dave Davenport
3c8b757930 Remove auto : 2016-10-28 21:52:22 +02:00
Dave Davenport
c598791aa4 Indent 2016-10-28 18:57:12 +02:00
Dave Davenport
8e0ced2378 Remove commented code 2016-10-28 18:32:29 +02:00
Dave Davenport
217290479e Merge two functions that no longer have a reason to be split.
Fixes: #491
2016-10-28 08:51:53 +02:00
Dave Davenport
fb459e1660 Make scrollbar behave better 2016-10-26 08:24:34 +02:00
Dave Davenport
163934fa8c Simplify some code, more comments. (90% docu) 2016-10-25 22:45:11 +02:00
Dave Davenport
a38ac9caf3 Update scrollbar behaviour, so dragging is more natural. (limit range from hw/2 to h-hw/2) 2016-10-25 21:19:39 +02:00
Dave Davenport
440756af94 Option to disable/enable the highlighting of match. 2016-10-24 21:47:36 +02:00
Dave Davenport
b19ab62e17 add scrollbar test. 2016-10-24 17:48:04 +02:00
Dave Davenport
0ae0d50bbc Revert "Fix: #485 Remove used modifiers before figuring out keybinding."
This reverts commit 25c210b851.
2016-10-23 13:23:04 +02:00
Dave Davenport
25c210b851 Fix: #485 Remove used modifiers before figuring out keybinding. 2016-10-23 13:08:52 +02:00
Dave Davenport
d25ad4dac6 clang-check fix. 2016-10-22 21:34:19 +02:00
Dave Davenport
881056ea9b Add some more tests, make some textbox api's private 2016-10-20 09:41:32 +02:00
Dave Davenport
7b3b68462e Fix memory leak in box and listview widget, add coverage make target. (ggcov and lcov) 2016-10-18 13:49:24 +02:00
Dave Davenport
b622a98d9c Fix some coverty found issues. 2016-10-17 20:54:41 +02:00
Dave Davenport
df26193096 Fix redrawing (call queue redraw, not need redraw) fix end of string check. 2016-10-17 20:54:02 +02:00
Dave Davenport
0e176199fc Fix some possible null pointer dereference. (clang-check) 2016-10-17 18:21:03 +02:00
Dave Davenport
313dffa28d Some comments 2016-10-16 19:38:33 +02:00
Dave Davenport
703426716a [DRun] Fix parsing subdirectories because of wrong suffix check 2016-10-16 14:49:32 +02:00
Dave Davenport
cdb1b96414 Fix issue #482: Set work directory 2016-10-15 20:00:26 +02:00
Dave Davenport
f0981d6697 Indenting, comments 2016-10-15 15:39:08 +02:00
Dave Davenport
9293c8b8ce More docu updates 2016-10-14 18:56:09 +02: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
eb5f169af0 Remove error check for large windows as it is incorrect often. Fix issue 468 2016-10-13 18:11:15 +02:00
Dave Davenport
f6755d8a18 Always fallback to mouse position when one of the -X options are choosen. 2016-10-13 18:09:03 +02:00
Dave Davenport
306eeac3fe Add some NULL tests to widget test 2016-10-13 17:54:52 +02:00
Dave Davenport
1cd94c27c7 Update documentation, tests for widget 2016-10-13 09:22:08 +02:00
Dave Davenport
3aa1922aa6 Remove padding from input bar: Fix #479 2016-10-13 08:53:22 +02:00
Dave Davenport
cc3bb30a7b Remove unneeded calls to tokenize. 2016-10-11 08:18:34 +02:00
Dave Davenport
07425fd10a Always refilter when switching modi. 2016-10-11 08:11:14 +02:00
Dave Davenport
f3298801f3 Split internal widget into separate file 2016-10-09 10:13:15 +02:00
Dave Davenport
f10bc5004f Make separator work in both directions ( hori/vert ). 2016-10-09 10:07:32 +02:00
Dave Davenport
3c64507f02 Qtk widgets (#478)
* Initial support for using boxes for packing widgets.

* Make CapiTalIzation more consistent

* Move widgets to subdirectory

* Removed nolonger needed resize function.

* Small cleanup

* When switching mode, reuse view, don't rebuild it. Reduces artifacts.

* Needs cleaning up.

* Remove separate prompt argument, use display_name

* Simplify run-switcher code.

* Add notion of parents, and trigger parent update on resize.

* Use widget_get_height wrapper, avoid crash

* Size separator width based on height. (indent)

 * TODO add margin to box.

* First draft version of listview.

* Add scrollbar to listview widget

* Add padding option to box

* Move access to global config out of widget. (1/2 done)

*  Remove printf

* Make listview not access global config

* Add click support, implement on mode buttons.

* Re-introduce mouse handling on list-view.

* TODO draggin on scrollbar.

* Fix multi-select

* Fix warnings

* Fix include
2016-10-08 18:57:59 +02:00
Dave Davenport
0da0587087 Make widget_free work on textbox and scrollbar, use widget specific free. 2016-09-27 22:38:26 +02:00
Dave Davenport
89acc7b6ed Make one widget_draw function, abstract rest (textbox, scrollbar) behind it. 2016-09-27 22:15:39 +02:00
Dave Davenport
769dab5f66 When view centered, don't change x,y. 2016-09-26 18:19:29 +02:00
Dave Davenport
ca766b4ed7 Still parse commandline options when -no-config is passed. 2016-09-18 22:29:05 +02:00
Dave Davenport
6131329210 Fix for #467, don't count border twice, take right line-margin into account. 2016-09-18 22:23:39 +02:00
Dave Davenport
acdb6bdf53 Fix fprintf. 2016-09-18 14:44:03 +02:00
Dave Davenport
5b843bd08b Remove entry from history if fails to execute.
Issue: #466
2016-09-17 21:28:22 +02:00
Dave Davenport
050fd66c02 Force dmenu in sync mode to stop breaking old features that rely on this. 2016-09-17 19:41:24 +02:00
Dave Davenport
5ee5bb1e23 First rough version of async loading for dmenu. 2016-09-17 18:57:44 +02:00
Dave Davenport
6191662ccf Fix indenting view.c. 2016-09-17 18:35:03 +02:00
Dave Davenport
3e272b2b00 Don't throw error when textbox gets input but is not editable. 2016-09-17 18:34:04 +02:00
Dave Davenport
d4d757a7c0 Allow for reloading of window content (10fps), needed for async transfer.
* Resize window to fit rows if not num-fixed-lines is set.
 * If there is no entry to show, remove separator.
 * Store size/pos per State.
2016-09-17 18:06:25 +02:00
Dave Davenport
cf70fbf709 Issue: #462 Do not blink on cursor move, text insert,remove. 2016-09-16 20:35:46 +02:00
Dave Davenport
05600368ff Small cleanups.
Remove duplicate code to update window size, make error dialog use normal mainloop.
2016-09-16 20:28:59 +02:00
Ian Remmler
71f5f1ac54 Initialize mouse_seen. (#461)
* Add Ian Remmler to AUTHORS.

* Explicitly initialize mouse_seen.
2016-09-09 20:36:12 +02:00
Dave Davenport
c200709838 Fix wrong entry + CI. 2016-09-08 22:56:22 +02:00
Ian Remmler
91e2ecf212 Added click-to-exit option. (#460)
Exit if a mouse button is pressed and released outside of the rofi
window.
2016-09-08 22:42:41 +02:00
Dave Davenport
e3fb17a843 Ask window manager to hide decoration in normal-window mode.
Issue #485
2016-09-08 08:57:35 +02:00
Dave Davenport
43be4bd18f Fix keyboard grab normal-window mode 2016-09-06 09:06:02 +02:00
Dave Davenport
926fbdb190 Release pointer too 2016-09-02 20:19:37 +02:00
Dave Davenport
4379f3be7c Ctrl-click does alternate accept entry.
Fixes #429
2016-09-02 18:19:16 +02:00
Dave Davenport
b420db8d30 Another trow at #454
- Hide window, ungrab mouse.
 - Flush, before switching window.
2016-09-02 09:38:51 +02:00
Dave Davenport
642cad350d Remove pointless NULL check. 2016-09-02 09:32:32 +02:00
Dave Davenport
4a4769f0b4 Add debug and indent 2016-08-31 10:06:42 +02:00
Dave Davenport
4a95285212 Merge branch 'seletskiy-xinerama'
* Tweak some minor things.
2016-08-31 09:59:51 +02:00
Dave Davenport
3da2867506 Merge branch 'xinerama' of https://github.com/seletskiy/rofi into seletskiy-xinerama 2016-08-31 09:44:11 +02:00
Dave Davenport
56cc94195c DRUN: Make name key required even when hidden. (#453) 2016-08-31 09:39:00 +02:00
Stanislav Seletskiy
a6207e473a remove functions from .h, free memory, int to bool 2016-08-31 14:29:25 +07:00
Stanislav Seletskiy
05165a02f2 add xinerama support 2016-08-31 14:10:30 +07:00
Dave Davenport
21b35b3e3e More debug, fix one off. 2016-08-30 21:56:51 +02:00
Dave Davenport
08319d6439 Keep a list of disabled Desktop files. 2016-08-30 21:49:46 +02:00
Dave Davenport
c099aaeabf Add debug output. 2016-08-30 21:24:04 +02:00
Dave Davenport
5646adc34d Add option to set padding within a line.
Fixes: #449
2016-08-30 18:07:34 +02:00
Dave Davenport
0d9d4d6c55 DRun Check if filename ends in .desktop. 2016-08-30 17:41:30 +02:00
Dave Davenport
ef509865fb Add extra debug to DRun Desktop File parsing. 2016-08-30 08:52:02 +02:00
Dave Davenport
51eac318fd Test #454 unmap window before switching. 2016-08-30 08:14:53 +02:00
Dave Davenport
e79361e890 Fix configure script a bit. 2016-08-29 21:38:29 +02:00
Dave Davenport
5cfe9a89b3 Improve DRun handling a bit.
- Remove entries that are deprecated or unsupported.
 - Handle field codes %c and %k

TODO:
 - Detect multiple identical field code entries and throw error.
2016-08-29 21:14:03 +02:00
Dave Davenport
1f641135e2 Extra checks when parsing file. 2016-08-29 08:55:28 +02:00
Dave Davenport
a90ff48032 But broken drun under a configure option. 2016-08-29 08:46:21 +02:00
Dave Davenport
58eaa81520 Name field in desktop file is required. 2016-08-29 08:23:55 +02:00
Dave Davenport
56c2d0dfb2 Disable drun mode as it is broken.
* Does not handle %[uf] whatever in Exec command.
 * It is not it own binary.
 * It has no build in file browser.
 * etc.
2016-08-29 07:49:11 +02:00
Dave Davenport
e4cab560f4 First hack at fixing Desktop file parser. 2016-08-28 22:43:42 +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
fice-t
a657f81145 Bind Control+g to kb-cancel (#452)
Control+g is the Emacs/readline standard for abort, so it would be nice
to have this by default.
2016-08-25 07:52:54 +02:00
Dave Davenport
99cb1e6f11 Don't force an second error when monitor is not found. 2016-08-24 10:36:39 +02:00
Dave Davenport
ef3c773097 Constness. 2016-08-24 00:39:56 +02:00
Dave Davenport
ad53de507c Extra cleanup at exit. 2016-08-22 08:39:22 +02:00
Dave Davenport
284b3cb78b Update manpage to show -display- option, sidebar mode uses display name. 2016-08-22 08:04:20 +02:00
Dave Davenport
6225b29d94 Issue 448, Take another default that should not fail, better error mesg 2016-08-19 18:01:26 +02:00
Dave Davenport
df7468b491 Use XRandr to get monitor layout instead of xinerama.
* You can now specify monitor by name, or primary status.
2016-08-19 10:46:38 +02:00
Dave Davenport
26d1e64b22 Make textbox use character position instead of byte index for cursor. 2016-08-15 09:01:56 +02:00
Dave Davenport
b5595d7a7e Fix #443 2016-08-13 16:22:15 +02:00
Dave Davenport
026a8cbb34 Fix #438 look for a 8 bpc 32bit visual, fixes 10bpc 30bit screen 2016-08-07 13:26:28 +02:00
Dave Davenport
6495d8e8df Add -input to -h output 2016-08-05 07:45:39 +02:00
Dave Davenport
eb0bfc60c4 Indicate what set an option, comment default options in dump-xresources. 2016-08-04 20:24:01 +02:00
Dave Davenport
ce822a3bbf Fix memory leak run dialog when skipping. 2016-08-02 18:37:14 +02:00
Dave Davenport
90c6c1125f Fix memory leak overlay widget 2016-08-02 18:33:55 +02:00
Dave Davenport
604b4cb619 Fix memory leak, re-indent 2016-07-31 23:28:31 +02:00
Dave Davenport
4ad2c37eea textbox: Handle tall glyphs better (#433)
We now place text based on the baseline, instead of the top of the
tallest glyph.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-07-30 20:39:45 +02:00
Dave Davenport
4be25abad7 Fix some doxygen warnings. 2016-07-29 08:32:34 +02:00
Dave Davenport
8478b427f1 Fix Control+u behaviour 2016-07-27 08:10:55 +02:00
Dave Davenport
fe230eb95c Fix #432, Control+k removes till eol. 2016-07-25 11:32:30 +02:00
Dave Davenport
22c8760e32 First try at fixing #430. Needs testin. 2016-07-22 09:44:12 +02:00
Dave Davenport
5d5c9713d7 Fix crasher on no scrollbar and mouse seek. 2016-07-21 07:57:35 +02:00
Dave Davenport
602eb63557 Add `-multi-select flag to dmenu.
* Changes default behaviour.
2016-07-18 23:58:08 +02:00
Dave Davenport
59635919ea Add selection indicator to dmenu mode. 2016-07-18 23:49:26 +02:00
Dave Davenport
85d95c4f8f Fix memory leak 2016-07-16 22:36:20 +02:00
Dave Davenport
e9c3b930bc [Window] Chomp result
Fixes #426
2016-07-16 22:25:00 +02:00
Dave Davenport
b31cf1d32f On rofi -show without argument, run de first one from the modi list. 2016-07-13 08:55:40 +02:00
Dave Davenport
b47e9c3846 Allow for more advanced window 'line' formatting 2016-07-12 10:44:43 +02:00
Dave Davenport
342192b4ed Remove work-around for older i3 version (< 4.9)
- I3 got ewhm support in Feb. 2015.
2016-07-06 08:34:47 +02:00
Dave Davenport
dfc952f570 Add missing static 2016-07-05 18:13:53 +02:00
Dave Davenport
b7fba9752f Don't double switch something trivial. 2016-07-05 09:21:50 +02:00
Dave Davenport
7c9f5e01fd Fix tests and crash. 2016-06-28 23:34:07 +02:00
Dave Davenport
9f25a975ae Fix windowcd command and allow custom Window string format 2016-06-28 23:07:48 +02:00
Dave Davenport
3ac07c3535 Fix indenting 2016-06-27 20:43:09 +02:00
Dave Davenport
baee50e346 XRM: rofi is not a class name 2016-06-27 08:26:09 +02:00
Dave Davenport
4af6976411 Fix piece of weird code to fetch background image. 2016-06-26 17:10:29 +02:00
Dave Davenport
6e2d0b6319 Add selection counter in dmenu mode 2016-06-26 15:48:12 +02:00
Dave Davenport
c87e91b6d9 Make select behave more Rasi-ish 2016-06-26 11:00:23 +02:00
Dave Davenport
40f95ae81f Make bit functions static 2016-06-25 17:40:24 +02:00
Dave Davenport
ce645d78b3 Multi-select with unselect 2016-06-25 17:36:35 +02:00
Dave Davenport
a7922cc07c Remove xlib dependency, add xcb-util-xrm. 2016-06-25 14:01:41 +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
5fb6ee1383 Fix rootwindow set at wrong pointer level. 2016-06-21 22:09:29 +02:00
Dave Davenport
1f4af41e96 Split Custom and Alternate command. 2016-06-19 18:02:49 +02:00
Dave Davenport
dab872879e Remove Tab from row-down list 2016-06-18 21:18:06 +02:00
Dave Davenport
03239cb989 Remove fuzzy matching option. 2016-06-18 20:54:29 +02:00
Dave Davenport
7a2435a23b Indent don't use partial match. 2016-06-16 22:23:55 +02:00
Dave Davenport
57336b96f0 Merge remote-tracking branch 'origin/master' into highlight_match 2016-06-16 08:41:40 +02:00