move everything to root
This commit is contained in:
parent
2a7de7e56a
commit
5feccc7452
15 changed files with 1 additions and 1 deletions
49
modules/bar/components/Clock.qml
Normal file
49
modules/bar/components/Clock.qml
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import QtQuick
|
||||
import "root:styled"
|
||||
|
||||
Item {
|
||||
id: clock
|
||||
|
||||
implicitWidth: 200
|
||||
implicitHeight: 30
|
||||
|
||||
StyledLabel {
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
StyledText {
|
||||
id: text
|
||||
anchors.centerIn: parent
|
||||
|
||||
Process {
|
||||
// give the process object an id so we can talk
|
||||
// about it from the timer
|
||||
id: dateProc
|
||||
|
||||
command: ["date"]
|
||||
running: true
|
||||
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: text.text = this.text
|
||||
}
|
||||
}
|
||||
|
||||
// use a timer to rerun the process at an interval
|
||||
Timer {
|
||||
// 1000 milliseconds is 1 second
|
||||
interval: 1000
|
||||
|
||||
// start the timer immediately
|
||||
running: true
|
||||
|
||||
// run the timer again when it ends
|
||||
repeat: true
|
||||
|
||||
// when the timer is triggered, set the running property of the
|
||||
// process to true, which reruns it if stopped.
|
||||
onTriggered: dateProc.running = true
|
||||
}
|
||||
}
|
||||
}
|
||||
38
modules/bar/components/Workspace.qml
Normal file
38
modules/bar/components/Workspace.qml
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import Quickshell.Hyprland
|
||||
import "../../../config"
|
||||
|
||||
Item {
|
||||
id: workspace
|
||||
|
||||
required property HyprlandWorkspace modelData
|
||||
|
||||
visible: modelData.id > 0
|
||||
|
||||
width: 30
|
||||
height: 30
|
||||
|
||||
Button {
|
||||
id: button
|
||||
anchors.centerIn: parent
|
||||
|
||||
padding: 6
|
||||
leftPadding: 7
|
||||
rightPadding: 7
|
||||
|
||||
background: Rectangle {
|
||||
id: rectangle
|
||||
anchors.fill: parent
|
||||
color: "#161212"
|
||||
radius: 8
|
||||
}
|
||||
|
||||
rotation: workspace.modelData.active ? 0 : 180
|
||||
|
||||
icon.source: "/home/baobeld/dotfiles/quickshell/assets/triangle.svg"
|
||||
icon.color: workspace.modelData.active ? Theme.palette.primary : Theme.palette.basecontent
|
||||
|
||||
onClicked: workspace.modelData.activate()
|
||||
}
|
||||
}
|
||||
16
modules/bar/components/Workspaces.qml
Normal file
16
modules/bar/components/Workspaces.qml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import Quickshell.Hyprland
|
||||
|
||||
Row {
|
||||
id: root
|
||||
|
||||
spacing: 4
|
||||
|
||||
Repeater {
|
||||
|
||||
model: Hyprland.workspaces
|
||||
|
||||
Workspace {}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue