quickshell work
This commit is contained in:
@@ -1,28 +1,49 @@
|
||||
import QtQuick // for Text
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Services.Notifications
|
||||
import Quickshell.Io
|
||||
import Quickshell.Widgets
|
||||
|
||||
Item {
|
||||
width: 30
|
||||
width: 50
|
||||
height: 30
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
width: 30; height: 30
|
||||
anchors.fill: parent
|
||||
Button {
|
||||
id: button
|
||||
text: ""
|
||||
//icon.source: ''
|
||||
font.pointSize: 16
|
||||
Process {
|
||||
id: launcher
|
||||
running: false
|
||||
command: ["rofi", "-show", "drun"]
|
||||
|
||||
onClicked: {
|
||||
while(server.trackedNotifications.values.length > 0) {
|
||||
server.trackedNotifications.values[0].dismiss()
|
||||
}
|
||||
|
||||
text = ""
|
||||
}
|
||||
onClicked: launcher.running = true
|
||||
implicitHeight: parent.height
|
||||
}
|
||||
}
|
||||
|
||||
NotificationServer {
|
||||
id: server
|
||||
persistenceSupported: true
|
||||
imageSupported: true
|
||||
actionsSupported: true
|
||||
bodyImagesSupported: true
|
||||
bodySupported: true
|
||||
bodyHyperlinksSupported: true
|
||||
inlineReplySupported: true
|
||||
actionIconsSupported: true
|
||||
|
||||
onNotification: (n) => {
|
||||
n.tracked = true
|
||||
console.log(n?.body)
|
||||
button.text = ' ' + (server.trackedNotifications.values.length + 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user