rofi/source
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
..
dialogs Follow Type=Link standard desktop entries with drun (#1168) 2020-08-26 21:10:04 +02:00
widgets micro-refactoring: widget.c (#1148) 2020-07-11 14:48:58 +02:00
css-colors.c [ThemeParser] Add CSS color names support 2017-05-15 22:46:33 +02:00
helper.c [Matching] Make fuzzy matching non-greedy 2020-08-25 20:23:26 +02:00
history.c Update copyright dates. 2020-01-01 12:23:12 +01:00
keyb.c Indent all the code. 2020-02-02 13:56:37 +01:00
mode.c Update copyright dates. 2020-01-01 12:23:12 +01:00
rofi-icon-fetcher.c [IconFetcher] Do faster scaling. 2020-02-14 14:37:41 +01:00
rofi-types.c Support rasi config character type options (#1131) 2020-05-17 14:50:38 +02:00
rofi.c Add extra timing debug. 2020-08-19 22:44:55 +02:00
theme.c Millimeter support for distance (#1144) 2020-06-09 22:19:43 +02:00
timings.c Indent all the code. 2020-02-02 13:56:37 +01:00
view.c When no dpi set (-1) set the default one for fonts handling. 2020-06-09 22:51:44 +02:00
xcb.c Indent all the code. 2020-02-02 13:56:37 +01:00
xrmoptions.c Follow Type=Link standard desktop entries with drun (#1168) 2020-08-26 21:10:04 +02:00