rofi/source/dialogs
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
..
combi.c [Combi] Remove strchrnull 2020-04-07 12:48:53 +02:00
dmenu.c [Script] Add 'info' row option, that gets passed to ROFI_INFO environment. 2020-05-24 19:10:49 +02:00
drun.c Follow Type=Link standard desktop entries with drun (#1168) 2020-08-26 21:10:04 +02:00
help-keys.c Update copyright dates. 2020-01-01 12:23:12 +01:00
run.c Update copyright dates. 2020-01-01 12:23:12 +01:00
script.c script: Fix parsing of extras (#1141) 2020-06-06 18:32:14 +02:00
ssh.c Indent all the code. 2020-02-02 13:56:37 +01:00
window.c [Window] On window name list, Check if we go out of range. 2020-05-24 17:14:12 +02:00