forked from Shinonome/dots-hyprland
replace xdg-open with Qt.openUrlExternally
This commit is contained in:
@@ -86,19 +86,6 @@ Item { // Wrapper
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Process {
|
|
||||||
id: webSearch
|
|
||||||
property list<string> baseCommand: ["xdg-open"]
|
|
||||||
function search(query) {
|
|
||||||
let url = ConfigOptions.search.engineBaseUrl + query
|
|
||||||
for (let site of ConfigOptions.search.excludedSites) {
|
|
||||||
url += ` -site:${site}`;
|
|
||||||
}
|
|
||||||
webSearch.command = baseCommand.concat(url)
|
|
||||||
webSearch.startDetached()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Process {
|
Process {
|
||||||
id: executor
|
id: executor
|
||||||
property list<string> baseCommand: ["bash", "-c"]
|
property list<string> baseCommand: ["bash", "-c"]
|
||||||
@@ -366,7 +353,11 @@ Item { // Wrapper
|
|||||||
type: "Search the web",
|
type: "Search the web",
|
||||||
materialSymbol: 'travel_explore',
|
materialSymbol: 'travel_explore',
|
||||||
execute: () => {
|
execute: () => {
|
||||||
webSearch.search(root.searchingText);
|
let url = ConfigOptions.search.engineBaseUrl + root.searchingText
|
||||||
|
for (let site of ConfigOptions.search.excludedSites) {
|
||||||
|
url += ` -site:${site}`;
|
||||||
|
}
|
||||||
|
Qt.openUrlExternally(url);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import "root:/"
|
|||||||
import "root:/modules/common"
|
import "root:/modules/common"
|
||||||
import "root:/modules/common/widgets"
|
import "root:/modules/common/widgets"
|
||||||
import "root:/modules/common/functions/string_utils.js" as StringUtils
|
import "root:/modules/common/functions/string_utils.js" as StringUtils
|
||||||
|
import QtQml
|
||||||
import Qt.labs.platform
|
import Qt.labs.platform
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
@@ -151,7 +152,7 @@ Button {
|
|||||||
buttonText: qsTr("Open file link")
|
buttonText: qsTr("Open file link")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.showActions = false
|
root.showActions = false
|
||||||
Hyprland.dispatch(`exec xdg-open '${root.imageData.file_url}'`)
|
Qt.openUrlExternally(root.imageData.file_url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MenuButton {
|
MenuButton {
|
||||||
@@ -163,7 +164,7 @@ Button {
|
|||||||
onClicked: {
|
onClicked: {
|
||||||
root.showActions = false
|
root.showActions = false
|
||||||
Hyprland.dispatch("global quickshell:sidebarLeftClose")
|
Hyprland.dispatch("global quickshell:sidebarLeftClose")
|
||||||
Hyprland.dispatch(`exec xdg-open '${root.imageData.source}'`)
|
Qt.openUrlExternally(root.imageData.source)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MenuButton {
|
MenuButton {
|
||||||
|
|||||||
Reference in New Issue
Block a user