diff options
author | Wolfgang Müller | 2021-11-22 12:18:55 +0100 |
---|---|---|
committer | Wolfgang Müller | 2021-11-22 12:18:55 +0100 |
commit | 2eba263fdff917a20c46e34fb1ea63d3fe2ec27c (patch) | |
tree | 8a65aa7c5cfc7e1abe2c1a8081093cf1816f71bd /group-desktop | |
parent | 437e0257b70c72f350cb1ffb455047defb21c884 (diff) | |
download | portage-roles-2eba263fdff917a20c46e34fb1ea63d3fe2ec27c.tar.gz |
group-desktop: Have rofi not launch on no match
We consider this a misfeature but are unsure whether it warrants a flag
in the program. Carry the patch around for now.
Diffstat (limited to 'group-desktop')
-rw-r--r-- | group-desktop/patches/x11-misc/rofi/0001-Window-Do-not-launch-on-no-match.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/group-desktop/patches/x11-misc/rofi/0001-Window-Do-not-launch-on-no-match.patch b/group-desktop/patches/x11-misc/rofi/0001-Window-Do-not-launch-on-no-match.patch new file mode 100644 index 0000000..a6b7cc8 --- /dev/null +++ b/group-desktop/patches/x11-misc/rofi/0001-Window-Do-not-launch-on-no-match.patch @@ -0,0 +1,49 @@ +From 0c6acb2d451c8cc71f56eb7126e8165fdc8be9f3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Wolfgang=20M=C3=BCller?= <wolf@oriole.systems> +Date: Fri, 19 Nov 2021 17:16:52 +0100 +Subject: [PATCH] [Window] Do not launch on no match + +In 'window' mode, if the search string has not been found and the user +hits enter, rofi tries launching the search string. We find this feature +counter-intuitive. It is very easy to launch the wrong program, say +'mpd' when searching for 'mpdevil'. + +Since similar (in fact, superior) behaviour can be achieved with a +combined 'window,run' mode, get rid of this. +--- + source/dialogs/window.c | 19 ------------------- + 1 file changed, 19 deletions(-) + +diff --git a/source/dialogs/window.c b/source/dialogs/window.c +index 03a0736a..f3611367 100644 +--- a/source/dialogs/window.c ++++ b/source/dialogs/window.c +@@ -792,25 +792,6 @@ static ModeMode window_mode_result(Mode *sw, int mretv, + + return RELOAD_DIALOG; + } +- } else if ((mretv & MENU_CUSTOM_INPUT) && *input != NULL && +- *input[0] != '\0') { +- GError *error = NULL; +- gboolean run_in_term = ((mretv & MENU_CUSTOM_ACTION) == MENU_CUSTOM_ACTION); +- gsize lf_cmd_size = 0; +- gchar *lf_cmd = g_locale_from_utf8(*input, -1, NULL, &lf_cmd_size, &error); +- if (error != NULL) { +- g_warning("Failed to convert command to locale encoding: %s", +- error->message); +- g_error_free(error); +- return RELOAD_DIALOG; +- } +- +- RofiHelperExecuteContext context = {.name = NULL}; +- if (!helper_execute_command(NULL, lf_cmd, run_in_term, +- run_in_term ? &context : NULL)) { +- retv = RELOAD_DIALOG; +- } +- g_free(lf_cmd); + } else if (mretv & MENU_CUSTOM_COMMAND) { + retv = (mretv & MENU_LOWER_MASK); + } +-- +2.34.0 + |