add primitive wallpaper function, Clock and other Widget improvements
This commit is contained in:
parent
86474f0663
commit
a618427dae
@ -25,11 +25,12 @@ PanelWindow {
|
|||||||
RowLayout {
|
RowLayout {
|
||||||
id: centerLayout
|
id: centerLayout
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
Clock {}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: rightLayout
|
id: rightLayout
|
||||||
spacing: 0
|
spacing: 10
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
Volume {}
|
Volume {}
|
||||||
|
|||||||
@ -17,6 +17,7 @@ Item {
|
|||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
id: batteryText
|
id: batteryText
|
||||||
|
font.weight: 900
|
||||||
font.family: Appearance.font
|
font.family: Appearance.font
|
||||||
font.pixelSize: Appearance.fontSize
|
font.pixelSize: Appearance.fontSize
|
||||||
color: Colors.foreground
|
color: Colors.foreground
|
||||||
|
|||||||
@ -3,10 +3,23 @@ import Quickshell
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
implicitWidth: clockText.text.length + 10
|
// FIX: Real pixels please!
|
||||||
|
implicitWidth: clockText.implicitWidth
|
||||||
|
implicitHeight: 30
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: clockText
|
id: clockText
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
text: "sigma balls"
|
font.weight: 900
|
||||||
|
font.family: Appearance.font
|
||||||
|
font.pixelSize: Appearance.fontSize
|
||||||
|
color: Colors.foreground
|
||||||
|
|
||||||
|
text: Qt.formatDateTime(clock.date, "hh:mm")
|
||||||
|
|
||||||
|
SystemClock {
|
||||||
|
id: clock
|
||||||
|
precision: SystemClock.Minutes
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -70,6 +70,7 @@ Item {
|
|||||||
PwObjectTracker {
|
PwObjectTracker {
|
||||||
objects: Pipewire.defaultAudioSink
|
objects: Pipewire.defaultAudioSink
|
||||||
}
|
}
|
||||||
|
font.weight: 900
|
||||||
color: Colors.foreground
|
color: Colors.foreground
|
||||||
font.family: Appearance.font
|
font.family: Appearance.font
|
||||||
font.pixelSize: Appearance.fontSize
|
font.pixelSize: Appearance.fontSize
|
||||||
|
|||||||
@ -13,13 +13,10 @@ Item {
|
|||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
id: workspaceRepeater
|
id: workspaceRepeater
|
||||||
model: Hyprland.workspaces
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: workspaceCircle
|
width: 18
|
||||||
width: 16
|
height: 18
|
||||||
height: 16
|
radius: 10
|
||||||
radius: 20
|
|
||||||
//color: modelData.active ? myPallete.accent : myPallete.window
|
//color: modelData.active ? myPallete.accent : myPallete.window
|
||||||
color: modelData.active ? Colors.foreground : "transparent"
|
color: modelData.active ? Colors.foreground : "transparent"
|
||||||
|
|
||||||
@ -33,6 +30,7 @@ Item {
|
|||||||
color: modelData.active ? Colors.background : Colors.foreground // Set contrasting color for workspace number
|
color: modelData.active ? Colors.background : Colors.foreground // Set contrasting color for workspace number
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
model: Hyprland.workspaces
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
36
modules/wallpaper/Wallpaper.qml
Normal file
36
modules/wallpaper/Wallpaper.qml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import QtQuick
|
||||||
|
import Quickshell
|
||||||
|
import Quickshell.Wayland
|
||||||
|
|
||||||
|
WlrLayershell {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
// 1. Send it to the bottom of the stack!
|
||||||
|
layer: WlrLayer.Background
|
||||||
|
|
||||||
|
// 2. Stretch it to cover the ENTIRE screen
|
||||||
|
anchors {
|
||||||
|
top: true
|
||||||
|
bottom: true
|
||||||
|
left: true
|
||||||
|
right: true
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. IMPORTANT: Tell the compositor NOT to reserve space for this.
|
||||||
|
// If you don't do this, your wallpaper might push your windows aside!
|
||||||
|
exclusionMode: ExclusionMode.Ignore
|
||||||
|
|
||||||
|
// 4. The actual content
|
||||||
|
Image {
|
||||||
|
anchors.fill: parent
|
||||||
|
source: "/home/lucy/.walls/eoe.png"
|
||||||
|
fillMode: Image.PreserveAspectCrop
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bonus: A dark rectangle to dim the wallpaper slightly?
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
color: "black"
|
||||||
|
opacity: 0.2
|
||||||
|
}
|
||||||
|
}
|
||||||
20
shell.qml
20
shell.qml
@ -1,4 +1,22 @@
|
|||||||
//@ pragma UseQApplication
|
//@ pragma UseQApplication
|
||||||
import qs.modules.bar
|
import qs.modules.bar
|
||||||
|
import qs.modules.wallpaper
|
||||||
|
import Quickshell
|
||||||
|
|
||||||
Bar {}
|
Scope {
|
||||||
|
Variants {
|
||||||
|
id: wallpaperVariants
|
||||||
|
model: Quickshell.screens
|
||||||
|
delegate: Wallpaper {
|
||||||
|
screen: modelData
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Variants {
|
||||||
|
id: barVariants
|
||||||
|
model: Quickshell.screens
|
||||||
|
|
||||||
|
delegate: Bar {
|
||||||
|
screen: modelData
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user