From 51cb27f747b8792183c55d5e4b01da8e0323a009 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Tue, 3 Jun 2025 10:22:38 +0200 Subject: [PATCH] search: automatically trim file protocol in commands --- .config/quickshell/modules/overview/SearchWidget.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/modules/overview/SearchWidget.qml b/.config/quickshell/modules/overview/SearchWidget.qml index 96c2f0074..ea8dcb3b9 100644 --- a/.config/quickshell/modules/overview/SearchWidget.qml +++ b/.config/quickshell/modules/overview/SearchWidget.qml @@ -338,13 +338,13 @@ Item { // Wrapper } } const commandResultObject = { - name: searchingText, + name: searchingText.replace("file://", ""), clickActionName: qsTr("Run"), type: qsTr("Run command"), fontType: "monospace", materialSymbol: 'terminal', execute: () => { - executor.executeCommand(searchingText.startsWith('sudo') ? `${ConfigOptions.apps.terminal} fish -C '${root.searchingText}'` : root.searchingText); + executor.executeCommand(searchingText.startsWith('sudo') ? `${ConfigOptions.apps.terminal} fish -C '${root.searchingText.replace("file://", "")}'` : root.searchingText.replace("file://", "")); } } const launcherActionObjects = root.searchActions