diff options
Diffstat (limited to '')
-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 + |