forked from Shinonome/dots-hyprland
notif: escape when copying
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import "root:/modules/common"
|
import "root:/modules/common"
|
||||||
import "root:/services"
|
import "root:/services"
|
||||||
|
import "root:/modules/common/functions/string_utils.js" as StringUtils
|
||||||
import Qt5Compat.GraphicalEffects
|
import Qt5Compat.GraphicalEffects
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
@@ -121,7 +122,7 @@ Item {
|
|||||||
}
|
}
|
||||||
onPressAndHold: (mouse) => {
|
onPressAndHold: (mouse) => {
|
||||||
if (mouse.button === Qt.LeftButton) {
|
if (mouse.button === Qt.LeftButton) {
|
||||||
Hyprland.dispatch(`exec wl-copy '${notificationObject.body}'`)
|
Hyprland.dispatch(`exec wl-copy '${StringUtils.shellSingleQuoteEscape(notificationObject.body)}'`)
|
||||||
notificationSummaryText.text = `${notificationObject.summary} (copied)`
|
notificationSummaryText.text = `${notificationObject.summary} (copied)`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -537,7 +538,7 @@ Item {
|
|||||||
(contentItem.implicitWidth + leftPadding + rightPadding)
|
(contentItem.implicitWidth + leftPadding + rightPadding)
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
Hyprland.dispatch(`exec wl-copy '${notificationObject.body}'`)
|
Hyprland.dispatch(`exec wl-copy '${StringUtils.shellSingleQuoteEscape(notificationObject.body)}'`)
|
||||||
copyIcon.text = "inventory"
|
copyIcon.text = "inventory"
|
||||||
copyIconTimer.stop()
|
copyIconTimer.stop()
|
||||||
copyIconTimer.start()
|
copyIconTimer.start()
|
||||||
|
|||||||
Reference in New Issue
Block a user