initial commit
This commit is contained in:
@@ -0,0 +1,142 @@
|
|||||||
|
import Quickshell
|
||||||
|
import Quickshell.Io // for Process
|
||||||
|
import QtQuick
|
||||||
|
import Quickshell.Hyprland
|
||||||
|
import Quickshell.Services.SystemTray
|
||||||
|
|
||||||
|
Variants {
|
||||||
|
model: Quickshell.screens;
|
||||||
|
|
||||||
|
delegate: Component {
|
||||||
|
PanelWindow {
|
||||||
|
// the screen from the screens list will be injected into this
|
||||||
|
// property
|
||||||
|
required property var modelData
|
||||||
|
|
||||||
|
// we can then set the window's screen to the injected property
|
||||||
|
screen: modelData
|
||||||
|
|
||||||
|
anchors {
|
||||||
|
top: true
|
||||||
|
left: true
|
||||||
|
right: true
|
||||||
|
}
|
||||||
|
|
||||||
|
implicitHeight: 30
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
Singleton {
|
||||||
|
id: root
|
||||||
|
property string time
|
||||||
|
|
||||||
|
Timer {
|
||||||
|
id: timer
|
||||||
|
interval: 1000
|
||||||
|
running: true
|
||||||
|
repeat: true
|
||||||
|
onTriggered: dateProc.running = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
// give the text an ID we can refer to elsewhere in the file
|
||||||
|
id: clock
|
||||||
|
|
||||||
|
anchors.centerIn: parent
|
||||||
|
color: "white"
|
||||||
|
|
||||||
|
// create a process management object
|
||||||
|
Process {
|
||||||
|
id: dateProc
|
||||||
|
command: ["date", "+%a, %d %b %I:%M %P"]
|
||||||
|
running: true
|
||||||
|
|
||||||
|
stdout: StdioCollector {
|
||||||
|
onStreamFinished: clock.text = this.text
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Timer {
|
||||||
|
interval: 1000
|
||||||
|
|
||||||
|
running: true
|
||||||
|
|
||||||
|
repeat: true
|
||||||
|
|
||||||
|
onTriggered: dateProc.running = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: playbackTitle
|
||||||
|
x: 218
|
||||||
|
color: "white"
|
||||||
|
|
||||||
|
Process {
|
||||||
|
id: playbackProc
|
||||||
|
command: ["/home/user/.scripts/now-playing"]
|
||||||
|
|
||||||
|
running: true
|
||||||
|
|
||||||
|
stdout: StdioCollector {
|
||||||
|
onStreamFinished: playbackTitle.text = this.text
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Timer {
|
||||||
|
interval: 300
|
||||||
|
running: true
|
||||||
|
repeat: true
|
||||||
|
onTriggered: playbackProc.running = true
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ListView {
|
||||||
|
width: 200; height: 400
|
||||||
|
x: 120
|
||||||
|
model: Hyprland.focusedWorkspace
|
||||||
|
|
||||||
|
delegate: Text {
|
||||||
|
color: "white"
|
||||||
|
required property HyprlandWorkspace modelData
|
||||||
|
text: modelData.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Row {
|
||||||
|
x: 2035
|
||||||
|
spacing: 8
|
||||||
|
|
||||||
|
Repeater {
|
||||||
|
model: SystemTray.items
|
||||||
|
|
||||||
|
Image {
|
||||||
|
required property SystemTrayItem modelData
|
||||||
|
source: modelData.icon
|
||||||
|
width: 20; height: 20
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: updateCount
|
||||||
|
x: 2270
|
||||||
|
color: "white"
|
||||||
|
|
||||||
|
Process {
|
||||||
|
id: updateProc
|
||||||
|
command: ["/home/user/.scripts/check-update"]
|
||||||
|
|
||||||
|
running: true
|
||||||
|
|
||||||
|
stdout: StdioCollector {
|
||||||
|
onStreamFinished: updateCount.text = this.text
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user