quickshell stuff
This commit is contained in:
parent
449de3f702
commit
2038ab1d4f
6 changed files with 105 additions and 226 deletions
49
modules/styling/quickshell/bar/Bar.qml
Normal file
49
modules/styling/quickshell/bar/Bar.qml
Normal file
|
@ -0,0 +1,49 @@
|
|||
import Quickshell // for ShellRoot and PanelWindow
|
||||
import Quickshell.Io // For Processes
|
||||
import QtQuick // For Text
|
||||
|
||||
Scope {
|
||||
property string time;
|
||||
|
||||
Variants {
|
||||
model: Quickshell.screens
|
||||
|
||||
PanelWindow {
|
||||
property var modelData
|
||||
screen: modelData
|
||||
|
||||
anchors {
|
||||
top: true
|
||||
left: true
|
||||
right: true
|
||||
}
|
||||
|
||||
height: 30
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
|
||||
// now just time instead of root.time
|
||||
text: time
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Process {
|
||||
id: dateProc
|
||||
command: ["date"]
|
||||
running: true
|
||||
|
||||
stdout: SplitParser {
|
||||
// now just time instead of root.time
|
||||
onRead: data => time = data
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
interval: 1000
|
||||
running: true
|
||||
repeat: true
|
||||
onTriggered: dateProc.running = true
|
||||
}
|
||||
}
|
|
@ -1,35 +1,6 @@
|
|||
import Quickshell // for ShellRoot and PanelWindow
|
||||
import QtQuick // for text
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import "workspaces" as Workspaces
|
||||
|
||||
ShellRoot {
|
||||
PanelWindow {
|
||||
anchors {
|
||||
top: true
|
||||
left : true
|
||||
right:true
|
||||
}
|
||||
height: 30
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 0
|
||||
Loader {
|
||||
active: isSoleBar
|
||||
Layout.preferredHeight: active ? implicitHeight: 0;
|
||||
Layout.fillWidth: true
|
||||
sourceComponent: Workspaces.Widget {
|
||||
bar: root
|
||||
wsBaseIndex: 1
|
||||
}
|
||||
}
|
||||
Workspaces.Widget {
|
||||
bar: root
|
||||
Layout.fillWidth: true
|
||||
wsBaseIndex: 1;
|
||||
hideWhenEmpty: isSoleBar
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Bar {}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue