summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMike Dalessio <mike.dalessio@gmail.com>2020-08-26 15:10:04 -0400
committerGitHub <noreply@github.com>2020-08-26 21:10:04 +0200
commit5bec191d2ef3f7083573a99b4f9dd4fcc4a68208 (patch)
tree3bd26df111d7c0ea16a3bd71cfe62d81c0d58ed1 /include
parent120ce36055e3144ebb12493daed239f42fa7f755 (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/settings.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/settings.h b/include/settings.h
index 7c57080d..cecb9c34 100644
--- a/include/settings.h
+++ b/include/settings.h
@@ -119,14 +119,18 @@ typedef struct
SortingMethod sorting_method_enum;
/** Sorting method. */
char * sorting_method;
+
/** Desktop entries to match in drun */
char * drun_match_fields;
/** Only show entries in this category */
char * drun_categories;
/** Desktop entry show actions */
unsigned int drun_show_actions;
- /** Desktop entry show */
+ /** Desktop format display */
char * drun_display_format;
+ /** Desktop Link launch command */
+ char * drun_url_launcher;
+
/** Search case sensitivity */
unsigned int case_sensitive;
/** Cycle through in the element list */