forked from Shinonome/dots-hyprland
search: automatically trim file protocol in commands
This commit is contained in:
@@ -338,13 +338,13 @@ Item { // Wrapper
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const commandResultObject = {
|
const commandResultObject = {
|
||||||
name: searchingText,
|
name: searchingText.replace("file://", ""),
|
||||||
clickActionName: qsTr("Run"),
|
clickActionName: qsTr("Run"),
|
||||||
type: qsTr("Run command"),
|
type: qsTr("Run command"),
|
||||||
fontType: "monospace",
|
fontType: "monospace",
|
||||||
materialSymbol: 'terminal',
|
materialSymbol: 'terminal',
|
||||||
execute: () => {
|
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
|
const launcherActionObjects = root.searchActions
|
||||||
|
|||||||
Reference in New Issue
Block a user