quickshell work

This commit is contained in:
2025-11-09 18:02:29 -06:00
parent 160ae56e03
commit 103c8e803a
9 changed files with 256 additions and 85 deletions

View File

@@ -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)
}
}
}