Commit graph

2154 commits

Author SHA1 Message Date
TonCherAmi
62ec84b5e6
[Doc] Document -drun-url-launcher. (#1328) 2021-06-08 20:25:05 +02:00
Dave Davenport
cb250fa73a Add fallback icon option. 2021-06-08 20:21:28 +02:00
Dave Davenport
6178970499 [DRun] Only go to file completer if desktop file support url. 2021-06-08 19:35:51 +02:00
Dave Davenport
6b9de4644e [DRun] Add file completer to drun mode.
Add icons to run mode.
2021-06-08 19:28:13 +02:00
Dave Davenport
0db6412ae2 [Doc,Config] Remove line-margin|padding and fix doc mistake.
*Deprecated* option.
2021-06-08 12:17:59 +02:00
TonCherAmi
c1244b066f
[FileBrowser] Allow setting startup directory (#1325) 2021-06-05 14:22:48 +02:00
Dave Davenport
2eefd9b191 [Run] Allow (Ctrl-L) to complete files using file-browser.
Merge old setup from #1116

issue: #1116  #659
2021-06-01 13:14:45 +02:00
Dave Davenport
3598ebe603 [Config] Quick hackish workaround for handling dynamic options from config file
Quick hackish workaround for having options that are added *after*
config file is parsed.
This needs to be replaced once the config system is revamped.

Fixes: #905
2021-06-01 12:17:59 +02:00
Dave Davenport
3b297ee80d Re-indent the code using indenter. 2021-06-01 10:44:23 +02:00
Dave Davenport
5a7df38ccd [Configuration] Remove old configuration format. 2021-06-01 10:43:25 +02:00
Dave Davenport
d857122251 [Script] Don't enable custom keybindings by default, script needs to enable this.
Having it on by default broke the default rofi workflow. Make it an
option now.

Fixes: #1286,#1226
2021-05-31 14:21:09 +02:00
Dave Davenport
f14c5c2ada [X11Helper] Add exception for bspwm window placing above window.
fixes: #1169
2021-05-31 14:02:08 +02:00
Dave Davenport
ac179cd2d9 [DRun] Add support for service files
Untested as I do not have these files myself.

Issue: #1152
2021-05-30 23:21:42 +02:00
unisgn
c3e70d4e1a
add prefix matching method feature (#1237)
* add prefix matching method feature

* Update helper.c

* prefix matching regex memory leak fix

* prefix matching regex memory leak fix

Co-authored-by: francis <oxfrancis@outlook.com>
2021-05-29 13:39:31 +02:00
Jas
24dde58019
Implement pango markup for -window-format (#1288)
* Implement pango markup for -window-format

* Make sure role != null

Since g_markup_escape_text doesn't like null it seems

* Update formatting

To bring it more in line with surrounding code

* Address review comments

* Fix memory leaks

* Fix formatting
2021-05-29 13:36:34 +02:00
Dave Davenport
2c30035640 [DRun] Fix sorting when name is NULL.
Thanks to nick87720z
2021-05-23 00:31:38 +02:00
Dave Davenport
2b86ece655 Update links to irc.libera.chat 2021-05-23 00:24:06 +02:00
TonCherAmi
dc28a97437
Add cursor property (#1313)
* Change mouse cursor on widget hover

Currently only listview element and editbox are supported.

* Add cursor property
2021-05-23 00:17:27 +02:00
Dave Davenport
04c006a4a2 [FileBrowser] fix escaping of paths. 2021-05-10 21:34:17 +02:00
Dave Davenport
fa96f32846 More doxygen cleanups. (1 warning left I don't understand) 2021-05-05 22:39:03 +02:00
Dave Davenport
f69f8fcb7b Cleanup code documentation. 2021-05-05 21:53:29 +02:00
Dave Davenport
37044dc27e Remove -dump-xresources option update manpage. 2021-05-04 20:44:38 +02:00
Dave Davenport
2516173a3d Remove parsing of xresource config settings via Xserver.
This option is deprecated.
2021-05-04 19:50:23 +02:00
Dave Davenport
67eda1a776 Remove -fullscreen option, deprecated by new theme format.
Use 'window {fullscreen: true;}' instead.
2021-05-02 20:15:58 +02:00
Dave Davenport
d539e6478a Remove -show-match option, deprecated.
Use 'element {highlight: none;}' in theme/configuration to reproduce it.
2021-05-02 20:01:03 +02:00
rahulaggarwal965
e304dbc883
Added -hover-select option that automatically selects the entry under the cursor (#1234) 2021-04-13 11:45:20 +02:00
Dave Davenport
318a6d40ca Add 'steal-focus' option instead of 'restore-focus' option.
Disable steal-focus by default.

Fixes: #1275
2021-04-13 11:35:34 +02:00
Dave Davenport
a3f12837cb Partially fix switching between modi, does not work for script mode.
Issue: #1286
2021-04-10 23:04:05 +02:00
Dave Davenport
8ac9890e8b [Listview] Check max_rows on nav_right/left.
Fixes: #1297
2021-04-10 22:26:37 +02:00
Dave Davenport
44d8320e5c [Window] revert accidental changes to window.c 2021-03-29 13:59:26 +02:00
Dave Davenport
750dbad729 Add [no]focus restore option. 2021-03-27 16:28:27 +01:00
Dave Davenport
20d236100f [window] do the focus_revert fix at the right place. 2021-03-02 18:20:57 +01:00
Dave Davenport
eb544b48bc [Window] do not revert focus on window switch. 2021-03-02 17:20:59 +01:00
Dave Davenport
e9cf6fb2b0 Improve blur algorithm. 2021-02-16 01:46:04 +01:00
Dave Davenport
606d9d12bf Test blurring of background image (screenshot/background/image).
window {
    blur: {radius};
}

Does not work on true transparency.
2021-02-15 23:30:58 +01:00
Dave Davenport
4e363e0c3f [Window] small fix to pass screen to stacking window list.
Issue: #1225
2021-02-13 13:08:39 +01:00
Dave Davenport
653f023b21 Small fix in log domain container 2021-02-03 22:03:29 +01:00
Dave Davenport
01935064d8 Add -rasi-validate option.
Issue: #1260
2021-01-26 17:27:32 +01:00
Dave Davenport
9dd54ac6c6 [Textbox] Allow markup to be disabled in theme.
Change textbox for message from textbox to message-textbox.

Issue: #1255
2021-01-19 23:55:07 +01:00
Dave Davenport
75e361ecab Reduce scope of variables. 2021-01-17 16:15:04 +01:00
Dave Davenport
519b2a22eb Add check for input == NULL. 2021-01-17 16:09:58 +01:00
Dave Davenport
9313d7a8a0 [Textbox] Allow theme to force markup enabled on textbox.
rofi -theme-str 'prompt { markup: true; }' -show drun -display-drun '<i>d</i>ru<b>n</b>'

fixes: #1220
2020-12-28 22:45:58 +01:00
Dave Davenport
af6752c35d [Textbox] When estimating height, set correct font first.
fixes: #1247
2020-12-27 21:25:06 +01:00
Quentin Glidic
2e18133667
xcb: Restore focus in more places
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2020-12-20 14:11:56 +01:00
Quentin Glidic
11b677b521
xcb: Nicer focus stealing in O-R mode
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2020-12-13 15:56:37 +01:00
Dave Davenport
ec858dd305 Revert "xcb: Steal focus in O-R mode"
This reverts commit 1c9d975dd2.

Fixes: #1228
2020-12-09 16:04:04 +01:00
Quentin Glidic
1c9d975dd2
xcb: Steal focus in O-R mode
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2020-11-27 07:26:17 +01:00
Quentin Glidic
627bd43510
xcb: Ask for focus where possible
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2020-11-27 07:26:16 +01:00
Tim Gates
d27d7eb669
docs: fix simple typo, prefered -> preferred (#1224)
There is a small typo in source/xcb.c.

Should read `preferred` rather than `prefered`.
2020-11-15 00:14:02 +01:00
Dave Davenport
7061eb21ae Indent round. 2020-11-03 23:57:02 +01:00
Dave Davenport
4878c5bd13 [RofiIconFetcher] Add missing free 2020-10-20 20:40:47 +02:00
Dave Davenport
deb1e6a208 [RofiIconFetcher] Switch to gdk-pixbuf. 2020-10-20 20:38:13 +02:00
Dave Davenport
6e98290335 [RofiIconFetcher] Do image checking in icon fetcher, use nkutils-enum 2020-10-18 22:01:49 +02:00
Dave Davenport
5994df7f04 [IconLoader] add optional gif loader. 2020-10-18 21:37:05 +02:00
Dave Davenport
d8a420c952 [FileBrowser] Small restructure. 2020-10-18 20:54:03 +02:00
Dave Davenport
08a40d13ce [Icons] Check both small and big caps for extention. 2020-10-17 22:05:17 +02:00
Dave Davenport
cc5a1989d8 [RofiIconFetcher] Don't exit out on libjpeg error, but don't load image. 2020-10-17 21:59:12 +02:00
Dave Davenport
e00ef7d993 [FileBrowser] Save last directory. 2020-10-16 21:33:02 +02:00
Dave Davenport
10678e55d8 [FileBrowser] Prepend '@' before filename if link. 2020-10-16 21:10:04 +02:00
Dave Davenport
9a21040d0e [FileBrowser] Add SVG as file type. 2020-10-16 20:22:27 +02:00
Dave Davenport
0d45686914 [FileBrowser] If link, use stat to check out type.
Fixes: #1214
2020-10-15 19:19:51 +02:00
Dave Davenport
eea8897501 Fix some of the documentation 2020-10-12 21:39:36 +02:00
Dave Davenport
585538b428 Try fixing build on meson of readdir dirent args. 2020-10-12 20:32:25 +02:00
Dave Davenport
519d4d2818 [FileBrowser] Add file browser modi. 2020-10-12 20:17:21 +02:00
Dave Davenport
b4bbce4af5 [Helper] Add -normalize-match option.
Decomposes string and remove accent characters before matching.
This makes o match ö, é match e and more.
It is not a perfect implementation but works.
Currently disables the match highlighting.

Fixes: #1119
2020-09-30 21:56:37 +02:00
Hpl4r
30fb1bd4e8
[HELP] Fix typo in help msgs (#1198) 2020-09-17 12:29:06 +02:00
Dave Davenport
7c331b130b [Calc] Add min/max operator support to calc()
Fixes: #1172
2020-09-14 20:34:39 +02:00
Dave Davenport
011908e1ff
issue 1187: If error on launching application, show error message and return to list` (#1193)
* Show error message, then possibly pop back to main window.

Fix drun/run dialog to use this for command execution.

Issue #1187

* [Combi] When no line selected, handle using the first entry.

* [Window] Add execute on invalid input to window dialog.

* Update view.h doxygen docu

* Update manpage with running application changes.
2020-09-13 21:56:25 +02:00
Dave Davenport
3499e1dad0 [Theme] First attempt at more cleanups and nested media support.
First throw at nested media support.

Issue: #1189
2020-09-13 15:11:12 +02:00
Dave Davenport
0a3734dce4 [Theme] Fix @media printing in -dump-theme. 2020-09-13 13:48:48 +02:00
Dave Davenport
31fc5c9d35 [Textbox] Try to fix estimated font height.
This was on newer pango 1 pixel off with actual font height.
This casues drawing issues.

Fixes: #1190
2020-09-13 10:24:59 +02:00
Dave Davenport
bff8948116 [DRun] Fix broken cache after URL type was added. 2020-09-09 22:46:18 +02:00
Dave Davenport
6a38f88e98 Split MENU_QUICK_SWITCH into MENU_CUSTOM_COMMAND/QUICK_SWITCH 2020-09-08 18:24:36 +02:00
nick87720z
96cd34d24f
Fix and optimize 20200908 (#1184)
* combi: Reuse own get_num_entries in self-init

* combi_mode_parse_switchers: Remove duplicated mode pointer

* combi_mode_parse_switchers: Regroup mode search lines

* combi_mode_result: Simplify switcher search quit

* mode_result: Check for mode switch actions before hook

These are over-mode actions, which should not be handled
in mode hooks at all.
2020-09-08 17:30:03 +02:00
Dave Davenport
88ac249d36 [Window] Try to clarify help.
Issue: #1183
2020-09-08 14:42:17 +02:00
Dave Davenport
f5bb9d2cbf [Widget] Fix border drawing code.
Fixes: #1177
2020-09-05 11:12:54 +02:00
lbonn
e4e59b99ea
Fix an unsafe use of strchr in dmenu mode (#1176)
Found with valgrind
2020-09-02 15:46:44 +02:00
Dave Davenport
30735791b4 Run indenter. 2020-08-28 16:41:59 +02:00
Mike Dalessio
5bec191d2e
Follow Type=Link standard desktop entries with drun (#1168)
* [DRun] Introduce data structure changes for Link desktop entries

From the [freedesktop spec][1]:

> This specification defines 3 types of desktop entries:
> Application (type 1), Link (type 2) and Directory (type 3). To allow
> the addition of new types in the future, implementations should
> ignore desktop entries with an unknown type.

This commit adds an enum to capture these types, and adds `type` to
DRunModeEntry.

  [1]: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

part of #1166

* [DRun] Sanity check Link entries and capture the URL

Note that we're introducing some logic that will differ depending on
the Desktop entry type (Application or Link). The logic is:

- if entry is Application type,
  - then Exec is required
  - and the value is saved in .exec
  - and drun_mode_result calls exec_cmd_entry
- if entry is Link type,
  - then URL is required (but is not saved in the DRunModeEntry)
  - and drun_mode_result calls new function launch_link_entry

part of #1166

* [DRun] Launch desktop links via xdg-open

Note that this introduces a new dependency on xdg-open, which may not
be installed. In that case, rofi will display an error dialog
with something like:

  "Failed to execute child process xdg-open (No such file or directory)"

which hopefully is explanatory enough for folks.

part of #1166

* Make drun options comments consistent and add a bit of whitespace

* [DRun] new config option drun-url-launcher for opening links

In previous commit, this was a hard-coded string.

part of #1166
2020-08-26 21:10:04 +02:00
Dave Davenport
97ac7c9348 [Matching] Make fuzzy matching non-greedy 2020-08-25 20:23:26 +02:00
Dave Davenport
4f1169e326 Add extra timing debug.
Issue: #1162
2020-08-19 22:44:55 +02:00
nick87720z
57ee69367d
micro-refactoring: widget.c (#1148)
* widget.c: microrefactoring

* widget.c: join enable/disable functions
2020-07-11 14:48:58 +02:00
Dave Davenport
641cd4ef46 [Widget] Fix inconsistency in argument checking. 2020-07-09 17:47:32 +02:00
Dave Davenport
fc0ea0b22e Update changelog a bit. 2020-07-05 11:41:04 +02:00
nick87720z
e52094ee7a
Widget bg draw (#1147)
* Improved background draw code

- Better to read (precalculated coordinates)
- Unnecessary line_to in the end
- Don't use radius in calculations if zero

* Background draw - separate rounded rect function

* Limit background & border overlap size

Overlap is too good against artifacts when stiching antialiased areas to
be avoided, unless intermediate image is used for additive stiching. But
it doesn't look good with transparent borders, when overlaping background
is visible. It seems, that 1px overlap is right enough to completely
prevent artifacts. Though things may differ if one if side is 1px or
even 0px, while adjacent is still enough thick.

* Style: alignment, less noise, limit var scope
2020-06-17 14:10:48 +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
nick87720z
fb2ba8ada3
Millimeter support for distance (#1144) 2020-06-09 22:19:43 +02:00
nick87720z
e275ed2283
Again final workaround for #303 (#1142) 2020-06-09 17:17:50 +02:00
Quentin Glidic
3d5f0f086c
script: Fix parsing of extras (#1141)
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2020-06-06 18:32:14 +02:00
nick87720z
ae701ce54e
Entry info was not used at entry selection (#1140) 2020-06-06 18:28:39 +02:00
Dave Davenport
4821320833 [Listview] Try to fix sizing of barview.
Issue: #1137
2020-06-02 09:17:06 +02:00
Dave Davenport
da8c666e80 [Script] Initialize info entry. Don't pass entry at custom input.
Fixes: #1138
2020-05-30 10:44:37 +02:00
Dave Davenport
1342b733af [Script] Add 'info' row option, that gets passed to ROFI_INFO environment. 2020-05-24 19:10:49 +02:00
Dave Davenport
0e880e76a2 [Window] On window name list, Check if we go out of range. 2020-05-24 17:14:12 +02:00
Dave Davenport
3604b12fde Add check that looks if rofi is running inside rofi script mode. 2020-05-21 09:35:55 +02:00
Jason Kim
a4c5a92199
Support rasi config character type options (#1131)
* style: remove extra space

* feat: handle xrm_Char in config parser

Handle the `xrm_Char` case in the (rasi theme) config file parser.  This
should properly handle configuration like

```
matching-negate-char: "\0";
```

and

```
matching-negate-char: "-";
```

* refactor: don't handle mem in xrm_Char case

`mem` shouldn't ever be set when `XrmOption` is `type` `xrm_Char`.
Therefore, there is no need to check it and free it.  Remove that logic.

* refactor: further condense logic

* style: s/Everythin/Everything/

* style: s/parsing an section/parsing a section/

...and missing period.

* feat(lexer): add CHAR token

Add a `CHAR` token that takes things of the form `'<char>'` or some
specific backslash escape sequences like `'\''` and `'\0'`.  For now,
save it as a `T_STRING`.

* refactor: define char property type

* feat(parser): add cval and T_CHAR

* refactor: use char property for xrm_Char

Instead of using strings for property elements of type char, use
characters, which were recently added to the grammar.
2020-05-17 14:50:38 +02:00
Dave Davenport
191f49dbea [LISTVIEW] Support more customization in element. 2020-05-13 17:17:15 +02:00
Dave Davenport
f2b6cf6b3c [Widget] Propaget set_state to children. 2020-05-13 16:25:12 +02:00
nick87720z
8a2e67f6fe
workaround for #303 (#1122)
* workaround for #303

Subpixel rendering may be disabled by some clip paths or when text
itself is clipped.

* optimize draw_pango_layout()
2020-05-12 12:05:56 +02:00
Dave Davenport
2ccc65ff52 Add some ui benchmark code 2020-05-12 10:40:50 +02:00
Dave Davenport
865821f829 Update help for option in source code. 2020-05-10 15:47:20 +02:00
Dave Davenport
1a9e6450e3 [Helper] Throw error when shell parsing fails. 2020-05-04 14:10:35 +02:00
Dave Davenport
86cdcae55b [Window] Update manpage and --help. 2020-04-29 12:59:49 +02:00
Dave Davenport
9a3d4b1d2e [Test] Fix compiler warning, theme test (bug in lexer) and more. 2020-04-26 11:43:14 +02:00
Dave Davenport
151547a99e
[Themes] add calc() support to distance in theme format. (#1105)
* Initial test to allow math in distances.

Support + and -
Needs spaces around + and -.

* [THEME] Fix printing theme with math in distance.

* [Theme] use calc() syntax.

* [Theme] Add * and /  to calc().

* [Theme] Fix the precedense ordering in parsing. Also avoid making copies.

* [Theme] Don't print unneeded ().

* [Theme] Add modulo to calc.
2020-04-24 19:54:08 +02:00
Dave Davenport
906b520daf [Script] Add no-custom mode. 2020-04-22 23:41:25 +02:00
Jaakko Luttinen
ccfecef936
fix xetc to config_path (#1097) 2020-04-19 19:07:58 +02:00
Dave Davenport
ed55b6c634 check before xresource config file parsing if it exist 2020-04-19 16:24:17 +02:00
Dave Davenport
e7554da627 Parse XDG_CONFIG_DIRS for default configuration file. 2020-04-19 11:55:53 +02:00
Dave Davenport
3a9c60804b Add ROFI_PLUGIN_PATH environment variable. 2020-04-19 11:34:28 +02:00
Dave Davenport
3e64e4422d [DMenu] Implement -keep-right
Fixes: #1089
2020-04-16 23:31:43 +02:00
Dave Davenport
1104d1d53a [DRun] cleanup debug message. 2020-04-15 19:08:01 +02:00
Dave Davenport
0214d5a6e4 [DRun] Adding %% as escape character. 2020-04-15 19:06:39 +02:00
Dave Davenport
7587149950 [Script] Update example and doc. 2020-04-07 13:20:16 +02:00
Dave Davenport
de38e0f4a9 [Script|Dmenu] Don't -1 in a unsigned variable. 2020-04-07 13:14:53 +02:00
Dave Davenport
34a278f943 [Combi] Remove strchrnull
Issue: #1083
2020-04-07 12:48:53 +02:00
Dave Davenport
f63da72ea6 [Dmenu] Fix possible crash.
Don't pass empty string.

Issue: #1083
2020-04-06 23:31:45 +02:00
Dave Davenport
825fe4ae58 [Script] Fix crash when custom input with custom keybinding. 2020-04-05 13:19:22 +02:00
Dave Davenport
bacecf3044 [Script] Add environment variable to indicate state.
* ROFI_RETV shows the state rofi was in before calling rofi.
2020-04-05 12:56:33 +02:00
Dave Davenport
5879fd6099 [Script] Free g_shell_parse result. 2020-04-05 11:48:03 +02:00
Dave Davenport
aa07b8ef94 [Script] Add option to set deliminter and example script.
Issue: #1041
2020-04-01 13:58:01 +02:00
Dave Davenport
8be08007f8 [Textbox] Round estimated size up. 2020-03-31 14:05:12 +02:00
Dave Davenport
c6a405e840 Fix hack for height calc. 2020-03-30 00:09:28 +02:00
Dave Davenport
ca067234ff [Textbox|Listview] Fix sizing of textbox.
- don't get height of layout, but calculate height using metrics.
- listview, set string with right number of lines.

Issue: #925, #1069
2020-03-29 16:31:47 +02:00
Dave Davenport
d8a0f540f0 Add selected-row option to normal operation. 2020-03-29 12:56:47 +02:00
Dave Davenport
e0e6c5e670 Fix detection no theme. 2020-03-02 12:21:34 +01:00
Dave Davenport
333d71af11 [IconFetcher] Do faster scaling. 2020-02-14 14:37:41 +01:00
Dave Davenport
855d09ded7 [IconFetcher] Add jpeg support, scale on load.
TODO: fix scaling speed.
2020-02-14 14:27:03 +01:00
Dave Davenport
3bf9d3d3b1 [Script] Reload dialog, on selecting non-selectable item. 2020-02-13 21:32:19 +01:00
Dave Davenport
c458047ef6 [Script] Fix next dialog option.
Error slipped in from previous patch.

Issue: #1059
2020-02-13 21:29:02 +01:00
Dave Davenport
03775378e0 [Script] init nonselectable.
Issue: #1057
2020-02-13 16:52:11 +01:00
Dave Davenport
bc2e1549fb Add rofi-script manpage, add meta option support to dmenu.
update ronn to go-md2man
2020-02-02 17:21:21 +01:00
Dave Davenport
7dcc3f450c Add option to make entry non-selectable in dmenu/script.
Fixes: #1024
2020-02-02 14:21:29 +01:00
Dave Davenport
b169289996 Indent all the code. 2020-02-02 13:56:37 +01:00
Jeff
83c2e467d5
Add support for additional field on script entries meta (#1052)
* Add test for hidden meta data in script mode

The purpose of this is to provide support for "hidden" fields on a
script item that work for search but don't get displayed.  This is
mostly to provide something similar to the optional display (but still
matchable) fields in drun like "categories" or "keywords".  This also
enables the choice to display unicode icons but still allow for
searching for the keywords without needing to print them.

* Ignore the output file from test runs

* Add support for the "meta" field on script entries

This fields provides a matchable but unprinted string for entries in a
script mode list match.  This means you can use one thing but provide
multiple options that can match that item without polluting the list
view or make confusing output.

* Add new test to test suite file
2020-02-01 13:49:11 +01:00
Dave Davenport
a35a898816 [DRun] Add desktop cache
Add a desktop cache file. Usable for system with slow filesystems.

* -drun-use-desktop-cache
* -drun-reload-desktop-cache

Fixes: #1040
2020-01-26 12:47:04 +01:00
Dave Davenport
7a6fcb20f4 Initialize all the configuration before upgrading config. 2020-01-02 18:57:53 +01:00
Dave Davenport
25402f44eb [Textbox] Correctly fall back to content when str is empty. 2020-01-02 16:37:24 +01:00
Dave Davenport
b4b85b2a71 [Textbox] Don't use placeholder color for cursor. 2020-01-02 13:42:14 +01:00
Dave Davenport
b44b5e8d16 Add -upgrade-config option.
* Print warning when old-style configuration is used.
* Add -upgrade-config option.
2020-01-02 12:00:44 +01:00
Dave Davenport
7650ed5d7a [Listview] Small fix when distributing remaining space whith scrollbar. 2020-01-01 15:44:01 +01:00
Dave Davenport
b03edc5cf3 Update copyright dates. 2020-01-01 12:23:12 +01:00
Dave Davenport
f1a90c5d0c [Listview] Add more debug output for debugging. 2019-12-29 21:26:41 +01:00
Dave Davenport
de89be5c95 [Listview] Make str code more explicit. 2019-12-29 21:23:26 +01:00
Dave Davenport
cd4607c77c [Listview] Fix wrong flag set on index 2019-12-29 21:19:31 +01:00
Dave Davenport
50be2b446a [Timings] Add extra debug. 2019-12-29 20:38:30 +01:00
Dave Davenport
40c1476855 [Listview] Fix drawing issue 2019-12-29 20:33:34 +01:00
Dave Davenport
e6bed0e5d3 [Listview] Add support for showing the (keybindable) index.
fixes: #1050
2019-12-29 19:04:29 +01:00
Dave Davenport
afda9cbb13 [Doc] Update theme manpage with import. 2019-12-29 17:30:53 +01:00
Dave Davenport
f3bb043df0 [Textbox] Add placeholder.
Fixes: #1020
2019-12-26 14:24:10 +01:00
Dave Davenport
cc71fa13b7 [Window] Remove pointless mem duplication. 2019-12-20 15:55:23 +01:00
Dave Davenport
b71f51523a [Window] Remove arbitrary limit of 100 windows.
Fixes: #1047
2019-12-20 15:49:33 +01:00
Dave Davenport
e9dde8e2ac [Doc] Update rofi-theme documentation.
allow `content` as alias to `str` on textbox.
2019-12-14 10:59:10 +01:00
Dave Davenport
cd06d593b2 [listview] Always do full update to update all theme elements.
fixes: #1032
2019-11-23 16:23:58 +01:00
Dave Davenport
c4a4243616 [Theme] Add alpha channel to highlight color.
Fixes: 1033
2019-11-20 11:18:53 +01:00
Dave Davenport
37121bfbe2 [ListView] Fix right-to-left scrolling in bar-view.
Issue: #1028
2019-11-14 13:01:49 +01:00
Dave Davenport
eb5c4bfdcc [Box] Fix update not propagating to parent. 2019-11-07 12:44:20 +01:00
Dave Davenport
c1378e4c60 [View] Add two widgets num-rows/num-filtered-rows
Issue: #1026
2019-11-07 11:49:45 +01:00
Simon Legner
5f57519940 Fix typo "Csutom" (#1025) 2019-11-03 20:06:48 +01:00
Dave Davenport
74f7a48c4f [Textbox] Add theme option to stop blinking. 2019-11-03 11:31:08 +01:00
Dave Davenport
aeecf34c27 [Window] Add thumbnail of windows as option. 2019-10-17 21:19:19 +02:00
Dave Davenport
8590a7ccf2 [CI] Fixing some more doxygen warnings. 2019-09-30 10:57:23 +02:00
Dave Davenport
0a0556c765 [CI] Update missing documentation. 2019-09-30 10:35:12 +02:00
Dave Davenport
8d9e403659 Update copyright. 2019-09-27 11:58:32 +02:00
Dave Davenport
7c613f6a4c
Issue893: Add support for @media in the theme format. (#1015)
* [Lexer] Add support for @media.

Issue: #893

* [Theme] @media limit to px.

* [Theme@Media] add *{} support.

* [Theme@Media] Add support for monitor-id media.

* [Theme@Media] Code cleanup.

* [Theme@Media] Add min/max-aspect-ratio.

* [Theme@Media] Remove some debug output

Fixes: #893
2019-09-20 15:05:36 +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
aa35ecc40a [DRun] Add keywords to match and printing. 2019-08-20 22:51:07 +02:00
qball
ad74da45d1 [Workaround] Add default icon size. 2019-08-17 22:57:05 +02:00
Dave Davenport
245ce2a95f [Icon] Suppport distance for size. 2019-08-15 21:52:17 +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
204008d389 [DRun] Do not run custom command in drun mode.
Fixes: #966
2019-08-09 20:08:41 +02:00
Dave Davenport
a42e9f869f [DMenu] Strip pango markup when matching rows.
fixes: #579
2019-08-09 19:55:34 +02:00
Dave Davenport
f896146217 [DRUN] Add option to only show desktop files in certain categories
closes: #817
2019-08-09 19:33:23 +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
Keith Collister
d9eb9f25a1 Added 'rofi/themes' to paths checked for theme files (#1001) 2019-08-04 21:04:26 +02:00
Dave Davenport
eece00bad6 [combi|script] Add static keyword to inline get_index. 2019-07-09 09:01:35 +02:00
Dave Davenport
209fb9be18 [Script|Combi] Fix compilation warning about mixing singed and unsigned. 2019-07-06 17:04:17 +02:00
Kenneth Ho
be21fbae5d add pythonic rows selection to -a and -u (#985) 2019-07-02 21:27:46 +02:00
Dave Davenport
14955e5508 [SSH] Fix wrong sizeof in read_hosts_file 2019-06-24 22:09:19 +02:00
Dave Davenport
eb0e132bcc
[Timings] Move into new debug system. (#961)
* [Timings] Move into new debug system.

* [Timings] Remove newlines.
2019-05-11 20:57:18 +02:00
qball
871ea42785 [SSH] Always initialize .port field. 2019-05-10 20:29:11 +02:00
Dave Davenport
52c5592a6f [ListView|Textbox] Add user-settable ellipsize mode.
Fixes: #917
2019-05-04 11:04:54 +02:00
Dave Davenport
e7da00dbff [DMenu] Add format option to output string stripped from pango markup. 2019-05-04 10:24:59 +02:00
Dave Davenport
4707927031 [SSH] Match lowered keywords.
Fixes issue: #954
2019-04-24 21:59:36 +02:00
Dave Davenport
109bc23d53 [Dialogs.SSH] Remove use of g_ascii_string_to_signed. 2019-04-20 10:46:44 +02:00
Quentin Glidic
4224614115
theme: Fix g_list_copy_deep() warning
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2019-04-19 10:10:07 +02:00
Quentin Glidic
a9dae788d1
Correctly include config.h first
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2019-04-19 09:59:53 +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
011d92075c [Dmenu][Script] Share some code between the two modi 2019-04-02 13:51:53 +02:00
Dave Davenport
88d987b054 [DMenu] Add icon support.
Same syntax as used for script mode.

Fixes: #948 #840
2019-04-02 13:12:42 +02:00
Dave Davenport
7d117886b5 Use g_ascii_string_to_signed instead of atoi in ssh, allows error
checking.
2019-03-29 13:50:48 +01:00
Dave Davenport
fadfae5433 [Window] Fix default value and help comment. 2019-03-29 11:24:10 +01:00
Dave Davenport
8d4b8ce5de [Icon] Use horizontal align for x-align option.
Thx SardemFF7 for spotting this.
2019-03-24 12:37:27 +01:00
Dave Davenport
5b83b2ed23 Allow aligning icon 2019-03-24 10:31:13 +01:00
Dave Davenport
1a77cae593 When mode not found, show gui, not only on commandline. 2019-03-24 02:39:57 +01:00
Dave Davenport
6fffe427c4 Change sidebar in theme to mode-switcher.
Fixes: #930
2019-03-19 22:45:10 +01:00
Dave Davenport
beeb9c8b27 [SSH] Use \x1F as separator between host/command and port.
Fixes: #932
2019-03-08 13:46: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
ec81a17c41 [SSH] Expand path and use right strcmp.
Issue: #928
2019-03-04 23:16:14 +01:00
Dave Davenport
906a48f566 [SSH] Add support for UserKnownHostsFile
Issue: #928
2019-03-04 22:05:08 +01:00
Michael Stapelberg
6bbbd08941 Fix RandR 1.5 check: use RANDR_PREF_MINOR_VERSION (#918)
XCB_RANDR_MAJOR_VERSION/XCB_RANDR_MINOR_VERSION are the maximum supported (in code) version.

Before this commit, the check verified that your libxcb did not support a newer RandR version than your running server.
After this commit, the check verifies the server’s RandR version is at least 1.5.
2019-02-21 16:03:34 +01:00
Dave Davenport
335adc30b3 [DRun] Fix sorting of drun.
Thanks to ChrisJAllan
2019-02-17 20:42:14 +01:00
Dave Davenport
3c56761a76 [Helper] Add more error checking/reporting. 2019-02-10 14:32:21 +01:00
Dave Davenport
f49866bd8b [Doc] Update documentation to match changed functions. 2019-02-10 14:26:06 +01:00
Dave Davenport
fbd34c9635 [DRun] Sort the (non history) entries by name. Escape for pango. 2019-02-10 14:15:35 +01:00
Dave Davenport
f879062417 [SSH] Add support for parsing port number from known hosts file.
* Store port number in history.
* Parse the [host]:port format.
* Update default ssh command to (optionally) add -p {port}.

Fixes: #580
2019-02-10 13:56:44 +01:00
Dave Davenport
52204a527c Add option to change location of cache dir.
-cache-dir

Fixes: #769
2019-02-08 20:43:53 +01:00
Dave Davenport
2f2abffb98 [CodeCY] More cleanup. 2019-02-02 12:07:36 +01:00
Dave Davenport
804f130d5b [CodeCY] Cleanup some more warnings given by CodeCY. 2019-02-02 11:53:33 +01:00
Dave Davenport
40da1b25e2 [Theme3.0] Change reference to use the CSS like var() syntax.
Supports defaults var(name, default); var(name);
Where default can be another property.
(https://www.w3schools.com/css/css3_variables.asp)

This deprecates the @name syntax.

Fixes: #876
2019-01-29 17:56:45 +01:00
Dave Davenport
964af7ad35 [DRUN] Fix small memory leak loading desktop files. 2019-01-29 09:29:47 +01:00
Dave Davenport
f42cffe962 Return EX_DATAERR when fails to parse theme.
This way a script can check if there was an error, otherwise you can
wind up in a loop.
2019-01-07 17:21:31 +01:00
Yoav
238648b5b2 Add history ignore (#846) 2018-12-31 00:35:00 +01:00
Dave Davenport
8ea484349b Remove unused variable. 2018-12-15 21:22:53 +01:00
Till Hofmann
b77a48c628 tests: initialize char* in mode test (#875)
* tests: initialize char* in mode test

Currently, test_mode_result relies on undefined behavior.
The test calls mode_result, which checks whether the pointer is NULL.
However, the pointer was never initialized, so it may or may not be
NULL, depending on the compiler.

This caused a test failure on ppc64 and Fedora 28, apparently because in
this setting, gcc sets uninitialized pointers to NULL.

By initializing the pointer to the empty string, the behavior is defined
and the test passes on all architectures.

* mode: fix input pointer check in mode_result

Do not check whether *input (i.e., the char* the input points to) is
NULL, as this is valid. Instead, check whether the input itself is NULL.

* tests: make char* input arg in test_mode_result modifiable

The function mode_result expects a modifiable char*, initialize the
argument properly so it can be modified.
2018-12-14 17:05:07 +01:00
Dave Davenport
6b96ae123b Add an option to change the matching negation character.
Fixes: #877
2018-12-14 16:58:26 +01:00
Dave Davenport
76ceac1f20 [DRUN] Add drun-display-format. 2018-10-17 23:02:50 +02:00
Dave Davenport
f80e7d52bc [Helper] Remove fixed key/values and accept keys with NULL as values. 2018-10-17 22:41:20 +02:00
Dave Davenport
e8edc42f9d [Helper] Quick and dirty string replacer with optional keys block.
First (quick and dirty) version of a more advanced key replacer where
sets of text are only outputted if the contained key matches.
2018-10-16 21:01:45 +02:00
Lukas Alexandre
6830e5d117 Fixing typos in docs and error messages, "numger" -> "number" (#867) 2018-10-14 16:57:52 +02:00
Dave Davenport
11afb8e678 [Icon] Fix loading icons that are already in cache.
fixes: #860
2018-10-05 11:01:48 +02:00
Dave Davenport
114b2cf2fd [SSH] Improve parser for known_hosts a bit.
Issue: #820
2018-09-22 16:16:25 +02:00
Dave Davenport
a99cfa56c4 [Script] Add initial support for icons.
Issue: #840
2018-09-09 17:53:56 +02:00
Dave Davenport
859a9c79d6 Indent the code. 2018-08-08 15:55:13 +02:00
Dave Davenport
4538303be6 [DRUN] Add option to show actions in drun.
Fixes: #836
2018-07-28 11:12:11 +02:00
Dave Davenport
e4d823774c Export icon fetcher header, remove nxd from icon-fetcher header. 2018-07-14 18:05:34 +02:00
Dave Davenport
d526ae2ec3 [IconFetcher] preload the user set icon theme 2018-07-14 11:54:00 +02:00
Dave Davenport
09db7d5d3f [Tests] Fix window test. 2018-07-10 13:53:40 +02:00
Dave Davenport
a92bcc2818 [Theme] Change window layout for error dialog 2018-06-14 11:16:32 +02:00
Maxim Baz
ff9b0f5ccd Add default shortcuts: Shift+BackSpace to delete previous char, Ctrl+Left/Right for word movements (#790)
* Support Shift+BackSpace by default to delete previous char

* Support Ctrl+Arrow for word movements
2018-06-13 14:15:31 +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
d2576e9f1f More source code documentation updates 2018-06-12 12:31:34 +02:00
Dave Davenport
32b45c2d10 Fix documentation
* theme
* view
* textbox
2018-06-12 12:16:33 +02:00
Dave Davenport
b8592f8b99 Documentation updates.
* theme,
* view,
* textbox
* helper
2018-06-12 12:00:00 +02:00
Dave Davenport
b837c3fdff Change log domain from Utils.IconFetcher to Helpers.IconFetcher
Matches doxygen.
2018-06-12 11:47:03 +02:00
Dave Davenport
c856c1a8ab [Widget::Icon] Fix doxygen documentation in header file. 2018-06-12 11:28:31 +02:00
Dave Davenport
0633bc9dad Remove (unused) widget ref counting. 2018-06-12 10:08:29 +02:00
Dave Davenport
d4cfb5bb4b Fix crash in error dialog and tests. 2018-06-12 09:46:24 +02:00
Dave Davenport
c96ebfc2de Re-add icon-theme option. 2018-06-09 22:17:32 +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
a81e96fee7 Fix small memory leak in history. 2018-05-16 22:04:24 +02:00
Dave Davenport
2da5e5ee55 [TextBox] Add a reference to the cairo surface when displaying an icon. 2018-05-12 10:40:15 +02:00
Dave Davenport
3a726eabba
Fix how borders are drawn, so it looks correct when transparant. (#792)
* Try to fix borders a bit.

issue: #783

* Small cleanup to code, add comments to explain variables.
2018-04-08 10:19:43 +02:00
Dave Davenport
0f1717f829 [Script] Reset highlighting when reload view
Issue: #767
2018-02-08 17:56:31 +01:00
Dave Davenport
521843e9be
I749 (#766)
* [XCB] Use randr monitor API to get monitors.

Hopefully helps with issue #749.

* Add check for randr header version

* Fix API version check, and check the version of the server.

* Add some comments to the code.
2018-02-07 16:06:16 +01:00
Dave Davenport
ac29c537dd [SSH] Reload ssh when entry is deleted. 2018-02-06 21:03:07 +01:00
Quentin Glidic
5c5665efca
Revert "xcb: Add XKB_NEW_KEYBOARD_NOTIFY support"
This reverts commit e9532f584f.
It should not matter for rofi, which is not meant to stay around long,
and it messes with XTST (that tools like xscape use).

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2018-01-18 17:09:09 +01:00
Dave Davenport
7ad3ce25b1 [View] Added textboxes are set to autoheight and wrapping.
Fixes: #754
2018-01-14 11:47:04 +01:00