rofi/include
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 [Script] Add 'info' row option, that gets passed to ROFI_INFO environment. 2020-05-24 19:10:49 +02:00
widgets micro-refactoring: widget.c (#1148) 2020-07-11 14:48:58 +02:00
css-colors.h Indent the code. 2018-08-08 15:55:13 +02:00
display.h Update copyright dates. 2020-01-01 12:23:12 +01:00
helper-theme.h Update copyright dates. 2020-01-01 12:23:12 +01:00
helper.h Indent all the code. 2020-02-02 13:56:37 +01:00
history.h Update copyright dates. 2020-01-01 12:23:12 +01:00
keyb.h Update copyright dates. 2020-01-01 12:23:12 +01:00
mode-private.h Update copyright dates. 2020-01-01 12:23:12 +01:00
mode.h Update copyright dates. 2020-01-01 12:23:12 +01:00
rofi-icon-fetcher.h Indent the code. 2018-08-08 15:55:13 +02:00
rofi-types.h Millimeter support for distance (#1144) 2020-06-09 22:19:43 +02:00
rofi.h Update copyright dates. 2020-01-01 12:23:12 +01:00
settings.h Follow Type=Link standard desktop entries with drun (#1168) 2020-08-26 21:10:04 +02:00
theme.h [Themes] add calc() support to distance in theme format. (#1105) 2020-04-24 19:54:08 +02:00
timings.h Update copyright dates. 2020-01-01 12:23:12 +01:00
view-internal.h Indent all the code. 2020-02-02 13:56:37 +01:00
view.h [DMenu] Implement -keep-right 2020-04-16 23:31:43 +02:00
xcb-internal.h Update copyright dates. 2020-01-01 12:23:12 +01:00
xcb.h Update copyright dates. 2020-01-01 12:23:12 +01:00
xrmoptions.h Add -upgrade-config option. 2020-01-02 12:00:44 +01:00