Commit graph

1908 commits

Author SHA1 Message Date
lbonn
cef94af6e1 Merge remote-tracking branch 'upstream/next' into wayland 2020-09-29 21:10:56 +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
lbonn
f013971065 Merge remote-tracking branch 'upstream/next' into wayland 2020-09-06 22:56:59 +02:00
Dave Davenport
f5bb9d2cbf [Widget] Fix border drawing code.
Fixes: #1177
2020-09-05 11:12:54 +02:00
lbonn
2e1e362fd3 Fix fullscreen in wayland mode
Fixes #6
2020-09-02 20:51:10 +02:00
lbonn
1f828cb2c5 Fix font configuration on wayland
Fixes #9
2020-09-02 16:21:14 +02:00
lbonn
bd9b5e8bf4 Do not crash when no buffer in pool
Was causing segfaults when window content updates too fast.
2020-09-02 16:19:49 +02:00
lbonn
33fbefdb8d Account for no active view state in various callbacks 2020-09-02 16:19:44 +02:00
lbonn
afe553909d Merge remote-tracking branch 'upstream/next' into wayland 2020-09-02 16:10:58 +02:00
lbonn
d3e96f2762 Run indenter 2020-09-02 16:03:49 +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
lbonn
dc1b15945a Use TOP layer instead of OVERLAY on Wayland
Overlay is reserved for lock screens and similar programs.

Fixes #7
2020-08-14 17:20:21 +02:00
lbonn
975e7151f2 Avoid calling cleanup when display proxy is NULL 2020-07-24 19:30:02 +02:00
lbonn
04d2a7a73d wayland: High DPI support 2020-07-24 19:30:02 +02:00
lbonn
17b4265a5f Put most of view implementation in common 2020-07-24 19:30:02 +02:00
lbonn
8e53896bbd Avoid some indirections 2020-07-24 19:30:02 +02:00
lbonn
183b6b618e Factorize some view code 2020-07-24 19:30:02 +02:00
lbonn
98a9635173 Make xcb and wayland implementations coexist 2020-07-24 19:30:02 +02:00
lbonn
97ea1c6d0b Continue work on wayland mode
- Fix mouse support
- Handle key repeats
- Positioning
- Fix periodic count updates
2020-07-24 19:30:02 +02:00
lbonn
7d94413675 Display something on wayland with layer shell
Based on sardemff7 previous wayland attempt
2020-07-24 19:30:02 +02:00
lbonn
90cfdf9990 Move some generic stuff from xcb.h to display.h 2020-07-24 19:30:02 +02:00
lbonn
eb63d83a99 Start moving xcb-specific stuff to their own directory 2020-07-24 19:30:02 +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