Commit graph

468 commits

Author SHA1 Message Date
lbonn
eb63d83a99 Start moving xcb-specific stuff to their own directory 2020-07-24 19:30:02 +02:00
Dave Davenport
bf17e1c65e When no dpi set (-1) set the default one for fonts handling. 2020-06-09 22:51:44 +02:00
Dave Davenport
2ccc65ff52 Add some ui benchmark code 2020-05-12 10:40:50 +02:00
Dave Davenport
3e64e4422d [DMenu] Implement -keep-right
Fixes: #1089
2020-04-16 23:31:43 +02:00
Dave Davenport
b169289996 Indent all the code. 2020-02-02 13:56:37 +01:00
Dave Davenport
b03edc5cf3 Update copyright dates. 2020-01-01 12:23:12 +01:00
Dave Davenport
50be2b446a [Timings] Add extra debug. 2019-12-29 20:38:30 +01:00
Dave Davenport
c1378e4c60 [View] Add two widgets num-rows/num-filtered-rows
Issue: #1026
2019-11-07 11:49:45 +01:00
Dave Davenport
8d9e403659 Update copyright. 2019-09-27 11:58:32 +02:00
Dave Davenport
138acf6f3d Alow buttons to be added to the UI.
Support:
* ok
* custom
* ok|alternate
* custom|alternate

|alternate launches in terminal.
2019-09-16 22:07:30 +02:00
Dave Davenport
c3caa20df8 [Theme] Add sidebar as alias to mode-switcher 2019-08-24 11:04:45 +02:00
Dave Davenport
85279323e6 Set window title based on mode name.
For dmenu allow customize with `-window-title`.

Fixes: #969
2019-08-10 12:02:49 +02:00
Dave Davenport
618d1396ee
Issue949 (#999)
* [Issue 949] Add initial split of listview row into widget tree.

Allowing better themeing.

* Remove unneeded code from textbox. allow dis. icons.

* Fix typo.

* Fix wrong widget offset in textbox.

* Fix mouse handling

* [ListView] Add 'fixed-columns' boolean option.

* [Listview] Fix inversion of option.

* [ListView] remove commented old code.

* [Textbox] Handle null pointer on desired width.

* [Listview] Fix crasher with fixed_columns and more max elements requested items.

* Add hack to get backwards compatibility for new listview structure.

* Fix the scrollbar test.

* Fix tests for theme update..
2019-08-08 20:02:20 +02:00
Dave Davenport
52c5592a6f [ListView|Textbox] Add user-settable ellipsize mode.
Fixes: #917
2019-05-04 11:04:54 +02:00
Dave Davenport
5b96be66ae [View] Move overlay into the theme system instead of weird addon.
It is now a child in the inputbar.

Fixes: #950
2019-04-16 12:52:53 +02:00
Dave Davenport
6fffe427c4 Change sidebar in theme to mode-switcher.
Fixes: #930
2019-03-19 22:45:10 +01:00
Dave Davenport
2728e4ad23 [Theme] Make 'sidebar' settable by theme.
Now it needs a configuration option to enable, this should be just part
of the theme now.

Sidebar is the "sidebar" widget.

If not set by theme, old behaviour is still followed.
2019-03-05 10:11:34 +01:00
Dave Davenport
859a9c79d6 Indent the code. 2018-08-08 15:55:13 +02:00
Dave Davenport
a92bcc2818 [Theme] Change window layout for error dialog 2018-06-14 11:16:32 +02:00
Dave Davenport
bdb6abef4a
Sorting cleanup (#816)
* Add `-sorting-method` option remove weird -sort-levenshtein.

* Fix test for updated cmdline options.

* Update manpage
2018-06-13 11:57:23 +02:00
Dave Davenport
9909fb3d71 More documentation fixes 2018-06-12 14:11:08 +02:00
Dave Davenport
32b45c2d10 Fix documentation
* theme
* view
* textbox
2018-06-12 12:16:33 +02:00
Dave Davenport
d4cfb5bb4b Fix crash in error dialog and tests. 2018-06-12 09:46:24 +02:00
Dave Davenport
441c511296
Add an generic icon fetcher that can be used by any widget and re-uses the main threadpool.
Add an generic icon fetcher that can be used by any widget and re-uses the main threadpool.

* Make threadpool more generic usable.
* Add generic icon fetcher, that caches icons.
* Make DRUN use this fetcher.
* Add icon widget.

#809
2018-06-09 19:13:57 +02:00
Dave Davenport
7ad3ce25b1 [View] Added textboxes are set to autoheight and wrapping.
Fixes: #754
2018-01-14 11:47:04 +01:00
Dave Davenport
ae4ea622bb Fix (old style) fake-transparency and fake-background option.
- Broke and only setting it via theme worked.
2017-12-08 10:59:43 +01:00
Dave Davenport
07cf9aabc7 Re-calculate size before showing. 2017-11-30 11:01:23 +01:00
Edward Betts
79adae77d7 Correct spelling mistakes. (#722) 2017-11-23 18:41:52 +01:00
Dave Davenport
9cd1e3fac2 Indent 2017-11-07 20:04:07 +01:00
Dave Davenport
d9def87930 Allow height to be specified on window.
Fixes: #718
2017-11-06 20:49:26 +01:00
Dave Davenport
1dccdb302e Remove color from prompt, can be added in theme now.
fixed: #637
2017-10-30 21:40:13 +01:00
Dave Davenport
9ae62960c1 Indent files. 2017-10-05 17:45:50 +02:00
Dave Davenport
91d88b1fd1 Rename tokenize to helper_tokenize 2017-10-01 10:51:02 +02:00
Dave Davenport
ff4946edaf Cleanup compiler warnings.
- Unused var.
- Missing switch statement.
- Change fallthrough for older compilers.
2017-09-17 18:17:26 +02:00
Dave Davenport
acfc07a63e Fix Inherit keyword 2017-09-07 13:46:09 +02:00
Dave Davenport
50998b8f04 Flatten hierarchy, don't inherit by default.
* add keyword inherit to language parser and theme structure.
2017-09-06 10:03:44 +02:00
Dave Davenport
508e39c3f3 Set cursor to end of input field.
Fixes: #662
2017-08-29 10:40:24 +02:00
Dave Davenport
3c52f15140 Move more enums to rofi-types.h 2017-08-18 11:38:54 +02:00
Dave Davenport
7b57985203 Add wid:{window id} to monitor option.
- By specifying the window id, rofi will assume that window to be the
monitor (for placing.)
 - syntax: wid:{monitor id}

Issue: #632
2017-07-12 12:27:45 +02:00
Dave Davenport
5996303c08 Convert old location format into new, so we are compatible again.
Fixes: #630
2017-07-11 19:41:24 +02:00
Dave Davenport
d82231d0df Correctly switch to other RofiViewState.
* Triggers when error message occurs on handling action.
 * Reproducable with broken drun file. (give a non-existing path)
2017-07-05 00:14:28 +02:00
Dave Davenport
3556f65198 Update DPI value once auto-detected. 2017-06-26 20:14:51 +02:00
Dave Davenport
8f035bf919 Add extra checks so widgets do not get added twice. 2017-06-14 07:54:20 +02:00
Dave Davenport
a3c1ff7d94 [helper] Fix type issue with variadic function.
*
https://www.securecoding.cert.org/confluence/display/c/DCL11-C.+Understand+the+type+issues+associated+with+variadic+functions
2017-06-13 10:16:40 +02:00
Dave Davenport
1b3ce23b80 Add missing null statement for fallthrough 2017-06-12 08:53:16 +02:00
Dave Davenport
26d9da7263 Position the overlay in the top right corner of the listview. 2017-06-12 08:17:28 +02:00
Dave Davenport
c53e6cc20c Make the compiler STFU about desired fallthroughs.
* https://dzone.com/articles/implicit-fallthrough-in-gcc-7
2017-06-12 07:47:44 +02:00
Dave Davenport
f102ed7295 Center align sidebar buttons by default. 2017-06-11 19:23:18 +02:00
Dave Davenport
9fe67c1822 [TextBox] Remove TB_LEFT/CENTER/RIGHT replace with xalign/yalign. 2017-06-07 20:16:14 +02:00
Dave Davenport
d33edaf09d [View] Do not set rofi fullheight when num lines eq 0 2017-06-06 17:49:24 +02:00
Dave Davenport
2a18a46b24 [View] Update sidebar buttons when we have no prompt. 2017-06-06 09:40:56 +02:00
Dave Davenport
9a62bfd172 Run indenter. 2017-06-03 20:35:50 +02:00
Dave Davenport
684211aba4 [View] Remove extra return. 2017-06-03 20:33:30 +02:00
Quentin Glidic
0adc0d7c08
view: Always create textbox with type
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-06-03 20:04:21 +02:00
Dave Davenport
a2620745e2 Fix sidebar in stock theme and sidebar button clicking 2017-06-03 19:56:02 +02:00
Dave Davenport
8b7ceb9286 Fix textview clicking. 2017-06-03 18:34:26 +02:00
Dave Davenport
4bd9828aa7 Remove index from box_add. 2017-06-02 16:53:39 +02:00
Dave Davenport
1d622aa59c Change ThemeHighlight to RofiHighlightColorStyle 2017-06-02 16:46:28 +02:00
Dave Davenport
ea7d20d150 Change Orientation enum to RofiOrientation. 2017-06-02 16:34:52 +02:00
Dave Davenport
9915857a2e Change Distance struct to RofiDistance. 2017-06-02 16:25:47 +02:00
Dave Davenport
48bf1709b6 Rename HL_ to ROFI_HL_ and fix box test. 2017-06-02 16:09:20 +02:00
Dave Davenport
eec5c6eadc Add orientation property. 2017-06-02 14:05:19 +02:00
Dave Davenport
85b6e32158 Merge remote-tracking branch 'origin/master' into barview 2017-06-01 18:54:30 +02:00
Quentin Glidic
48a80e3f82
display: Introduce display.h
The API is meant to be neutral to fit any display backend.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-06-01 15:06:57 +02:00
Dave Davenport
cdc8e462b8 Merge remote-tracking branch 'origin/master' into barview 2017-06-01 14:20:36 +02:00
Quentin Glidic
93cb04e30f
xcb: Move (most) event handling to xcb.c
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-06-01 13:30:29 +02:00
Quentin Glidic
4792a16593
xcb: Hide release details
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-06-01 13:26:31 +02:00
Quentin Glidic
2b6c084f32
textbox: Fix appending more than one character
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-06-01 13:26:19 +02:00
Quentin Glidic
a8aac87bb0
xcb: Move GWater source in xcb.c
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-06-01 11:44:21 +02:00
Quentin Glidic
9b58a9bc31
xcb: Move more stuff to xcb.c
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-06-01 00:39:11 +02:00
Quentin Glidic
46dee2671d
x11-helper: Rename xcb.c
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-06-01 00:12:58 +02:00
Quentin Glidic
52aac6d3b6
gitmodules: Update libnkutils
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-05-31 20:26:12 +02:00
Quentin Glidic
ac8868f3b1
Indent icon code rework
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-05-31 20:21:58 +02:00
Dave Davenport
d8b0e24b09 Merge remote-tracking branch 'origin/master' into barview 2017-05-31 11:18:30 +02:00
Dave Davenport
4d8784cf85 Port fixes from icon-cleanup branch.
- Thread for fetching icons for drun.
- Fixed placing of icons instead of adding place-holder token that can
  mis-render.
- Give textbox TB_ICON flag.
2017-05-31 11:05:45 +02:00
Quentin Glidic
fb37aaa70d
view: Use \uFFFC character as icon placeholder
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-05-30 19:01:01 +02:00
Aaron Ash
43053cdfc3
view: Add icon (basic) support 2017-05-30 19:00:57 +02:00
Dave Davenport
9a6fd1c6c3 Merge in master 2017-05-30 16:23:19 +02:00
Quentin Glidic
4891bcd7eb
bindings: Use a wrapper around rofi_view_trigger_action
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-05-30 14:14:59 +02:00
Quentin Glidic
acc1fa45b9
widget: Add motion grab support
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-05-30 13:45:19 +02:00
Quentin Glidic
685d4f0e13
widget: Rely on find_mouse_target to send motion events
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-05-30 13:45:17 +02:00
Quentin Glidic
30da7e587a
widget: Add widget_xy_to_relative helper
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-05-30 13:44:05 +02:00
Quentin Glidic
d514cf4c26
view: Remove some more leftovers
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-05-30 12:06:18 +02:00
Quentin Glidic
5ea9a93cac
view: Drop leftover g_print
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-05-29 16:57:49 +02:00
Quentin Glidic
a9199e3e17
Use libnkutils for keybindings
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-05-29 16:51:06 +02:00
Dave Davenport
a5e5493d6b Add extra NULL checks. 2017-05-28 18:19:59 +02:00
Dave Davenport
28f116b4a2 Allow textbox to be added in theme 2017-05-28 18:05:02 +02:00
Dave Davenport
fff06fc880 Don't keep pointer to inputbar/main_box 2017-05-28 17:34:53 +02:00
Dave Davenport
5e946b8383 Fix sidebar mode 2017-05-28 17:19:34 +02:00
Dave Davenport
0fdb1068da Allow layout to be overwritten 2017-05-27 17:08:46 +02:00
Dave Davenport
c23df70aeb Allow interface to be dynamically changed. 2017-05-25 23:41:15 +02:00
Dave Davenport
da092c53ac [BarView] Use exact match for entry width. 2017-05-24 08:50:45 +02:00
Dave Davenport
a0df3b37c7 [Barview] Small cleanups. 2017-05-23 10:48:02 +02:00
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
c54a817555 If we hit edge of entry box, make left/right move forward to listview. 2017-05-12 16:08:49 +02:00
Quentin Glidic
6f117c3589
xkb: Use consumed2 API when available
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-05-04 23:42:01 +02:00
Dave Davenport
9afa7682f6 Fix some small warning because get_string returns const. 2017-04-28 09:15:01 +02:00
Dave Davenport
ce4b1b23b4 Re-Indent code 2017-04-27 22:59:14 +02:00
Dave Davenport
fb318f0ff8 Cleanups, fix arguments mismatch 2017-04-23 15:17:15 +02:00
Dave Davenport
854304ca2f Change screenshot warning to printf. 2017-04-18 19:32:52 +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
Quentin Glidic
cfbe4027bc
Consolidate logging
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-04-15 12:07:29 +02:00
Dave Davenport
ba9e1fb92a Switch to g_{debug,warning} instead of g_log 2017-04-15 11:37:50 +02:00
Dave Davenport
4156d142fe Set PID and wm_client_machine hints on rofi window. 2017-04-10 09:27:22 +02:00
Dave Davenport
2953e3cb1f Test if case_indicator exists before setting it. 2017-03-31 18:06:41 +02:00
Dave Davenport
eeee200d8f Remove old theme support. (part 1) 2017-03-29 20:18:41 +02:00
Dave Davenport
61e537a05f ISSUE 576: Clutching at straws.
* Don't use atexit anymore. (what happens with g_spawn and atexit?
should be fine, but a test).
 * Even though not needed, force wait on running thread (of which there
should be none) when destroy thread pool.
2017-03-25 14:23:31 +01:00
Dave Davenport
5c42f7f626 Do an extra log before calling unmap and destroy window 2017-03-21 19:59:40 +01:00
Dave Davenport
6447ddf0d7 clang-check fixes 2017-03-17 14:27:08 +01:00
Dave Davenport
50477a0b99 [Keys] Cleanup view a bit. 2017-03-17 14:07:11 +01:00
Dave Davenport
cee753bd3c Zeltakmadness (#572)
* Allow modi to set extra pango attributes on displayed rows

* Fix some documentation, only highlight the mode name with color.

* Small rename.
2017-03-10 23:39:29 +01:00
Dave Davenport
3f4d58ef53 Indent code. 2017-03-04 19:41:06 +01:00
Dave Davenport
45c70cbecf Allow modes to set message box, instead of view creation argument. 2017-03-01 09:57:54 +01:00
Dave Davenport
8bd7db31d2 Add message box to view structure. Always add it, disable it when not showing anything 2017-03-01 09:37:20 +01:00
Dave Davenport
9ee61a6447 Use new get_desired_height to determine height of error message dialog 2017-02-27 17:40:36 +01:00
Dave Davenport
0cd257f554 Add missing point in container name. 2017-02-27 16:50:56 +01:00
Dave Davenport
dc7e4aa96e Install some headers for use in plugins 2017-02-17 14:06:31 +01:00
Dave Davenport
fb05409365 Start of making SardemFF7 happy
Allow mode's to be loaded as dynamic plugins.
2017-02-14 08:52:17 +01:00
Dave Davenport
db92ff1f41 Add border radius to border around widget. 2017-02-06 21:17:56 +01:00
Dave Davenport
c5506e4cdd Allow bang to match multiple modes when incomplete to select single. Fixes #552 2017-02-04 10:54:15 +01:00
Dave Davenport
8ef7b4b794 Don't recreate every string everytime. 2017-02-03 20:49:16 +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
Dave Davenport
1ee67e8bba Always set size, to work better in floating window manager in normal window mode 2017-02-01 21:17:45 +01:00
Dave Davenport
8e64885c55 Set default language on pango context. 2017-02-01 08:47:43 +01:00
Dave Davenport
cbea7e3337 Add more debug output to timing on creating window 2017-01-31 17:58:23 +01:00
Dave Davenport
954288ab81 Give overlay widget a parent, queue widget redraw on enable/disable 2017-01-31 08:09:55 +01:00
Dave Davenport
c9d16d2eda Only pre-process input once. 2017-01-30 08:23:57 +01:00
Dave Davenport
6a01c9c9f8 Set WM_CLASS. Fixes #549 2017-01-29 21:29:26 +01:00
Dave Davenport
b63e417e38 Add configurable fonts for testing. #544 2017-01-24 08:40:37 +01:00
Dave Davenport
46db427735 Update DPI detection method. 2017-01-22 14:58:59 +01:00
Dave Davenport
2306e58a25 Output detected DPI to debug system. 2017-01-21 13:05:57 +01:00
Dave Davenport
0ebd6a260b Add auto-detect option to DPI setting. 2017-01-21 12:58:52 +01:00
Dave Davenport
be9ae4490c Don't release keyboard on FOCUS-out event.. for some reason we do not always get focus-in event 2017-01-19 19:12:28 +01:00
Dave Davenport
63d8bfb071 Updates 2017-01-11 23:19:29 +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
56c787690f Move full algorithm in function. 2017-01-11 09:14:01 +01:00
Dave Davenport
bfae111579 Fix indenting and header commenting. 2017-01-11 09:11:19 +01:00
Fangrui Song
d1edf0dc08 Revise fuzzy finding algorithm for -matching fuzzy 2017-01-11 08:59:34 +01:00
Dave Davenport
17155867a1 Add a quick theme tutorial. 2017-01-10 11:20:38 +01:00
Dave Davenport
268b0fa3b0 Super-1..10 keybinding activates row 1..10.
Allowing fore quick switching to entry.
https://forum.qtools.org/t/select-entry-by-offset/84/5
2017-01-10 07:41:37 +01:00
Dave Davenport
713d41f619 Allow matching highlighting to be set. Fixes #522 2017-01-09 00:09:02 +01:00
Dave Davenport
baab2047ad Indent magic, rework makefile so lexer and yacc file are not passed. 2017-01-08 21:36:06 +01:00
Dave Davenport
97d96fdabd Add fullscreen option to theme 2017-01-08 17:38:21 +01:00
Dave Davenport
26efbecbc3 Fix multiple -theme-str lines parsing, fix num lines 2017-01-08 17:18:49 +01:00
Dave Davenport
ce2cf6b2d9 Make error dialog widget layout match normal one 2017-01-08 16:49:46 +01:00
Dave Davenport
06c5f51e7d Allow to set anchor position on normitor and anchor position on window. 2017-01-06 19:04:25 +01:00
Dave Davenport
8bc1831d17 Allow window width to be set in theme 2017-01-06 17:21:21 +01:00
Dave Davenport
af8a6541a2 Order entries in box based on index, allow theme to override. 2017-01-06 16:41:23 +01:00
Dave Davenport
52f4f32d89 Listview: hide widget when no row is visible and dynamic is enabled. 2017-01-06 13:42:00 +01:00