mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 02:28:37 +02:00
fixed a lot of quickshell problems
This commit is contained in:
@@ -45,7 +45,7 @@ Item {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
Text {
|
||||
/*Text { // we sanitize in case there is some null notification
|
||||
Layout.maximumWidth: bannerRect.width
|
||||
text: root.notif.summary + (root.notif.body ? "\n=======" : "")
|
||||
font.family: "BigBlueTermPlusNerdFont"
|
||||
@@ -63,7 +63,24 @@ Item {
|
||||
font.pointSize: 14
|
||||
font.bold: false
|
||||
color: "#9292B6"
|
||||
}
|
||||
}*/
|
||||
Text {
|
||||
text: root.notif ? root.notif.summary + (root.notif.body ? "\n" : "") : ""
|
||||
font.family: "BigBlueTermPlusNerdFont"
|
||||
wrapMode: Text.Wrap
|
||||
font.pointSize: 18
|
||||
font.bold: true
|
||||
color: "#9292B6"
|
||||
}
|
||||
|
||||
Text {
|
||||
text: root.notif ? root.notif.body : ""
|
||||
font.family: "BigBlueTermPlusNerdFont"
|
||||
wrapMode: Text.Wrap
|
||||
font.pointSize: 14
|
||||
font.bold: false
|
||||
color: "#9292B6"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,8 @@ Item {
|
||||
visible: false
|
||||
Process {
|
||||
id: screamCmd
|
||||
command: ["play", "--no-show-progress", "assets/wilhelm-scream.ogg"]
|
||||
command: ["mplayer", "../assets/wilhelm-scream.ogg"]
|
||||
//command: ["play", "--no-show-progress", "assets/wilhelm-scream.ogg"]
|
||||
}
|
||||
onVisibleChanged: () => {
|
||||
if (visible) {
|
||||
@@ -177,7 +178,8 @@ Item {
|
||||
|
||||
Process {
|
||||
id: playSoundCmd
|
||||
command: ["play", "--no-show-progress", "assets/trumpet.wav"]
|
||||
command: ["mplayer", "../assets/trumpet.wav"]
|
||||
//command: ["play", "--no-show-progress", "assets/trumpet.wav"]
|
||||
}
|
||||
Component.onCompleted: playSoundCmd.startDetached()
|
||||
}
|
||||
|
||||
@@ -28,10 +28,15 @@ PanelWindow {
|
||||
|
||||
onNotification: notif => {
|
||||
notif.tracked = true;
|
||||
root.notifs = [...root.notifs, notif];
|
||||
}
|
||||
//root.notifs = [...root.notifs, notif]; // sometimes sent as null
|
||||
if (notif) {
|
||||
notif.tracked = true;
|
||||
root.notifs = [...root.notifs, notif];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
visible: stack.children.length != 0
|
||||
mask: Region {
|
||||
item: stack
|
||||
@@ -79,11 +84,13 @@ PanelWindow {
|
||||
notif: modelData
|
||||
|
||||
onDismissed: () => {
|
||||
if (notif) { //handles sometimes WARN scene: @notifs/Overlay.qml[82:-1]: TypeError: Cannot read property 'dismiss' of null
|
||||
modelData.dismiss();
|
||||
// Remove from list
|
||||
const index = root.notifs.indexOf(notif);
|
||||
if (index > -1)
|
||||
root.notifs.splice(index, 1);
|
||||
root.notifs.splice(index, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user