From 2eba263fdff917a20c46e34fb1ea63d3fe2ec27c Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Mon, 22 Nov 2021 12:18:55 +0100 Subject: 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. --- .../0001-Window-Do-not-launch-on-no-match.patch | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 group-desktop/patches/x11-misc/rofi/0001-Window-Do-not-launch-on-no-match.patch (limited to 'group-desktop') 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?= +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 + -- cgit v1.2.3-2-gb3c3