add primitive wallpaper function, Clock and other Widget improvements

This commit is contained in:
lucy 2025-12-22 13:55:00 +01:00
parent 86474f0663
commit a618427dae
7 changed files with 78 additions and 10 deletions

View File

@ -25,11 +25,12 @@ PanelWindow {
RowLayout {
id: centerLayout
anchors.centerIn: parent
Clock {}
}
RowLayout {
id: rightLayout
spacing: 0
spacing: 10
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
Volume {}

View File

@ -17,6 +17,7 @@ Item {
}
Text {
id: batteryText
font.weight: 900
font.family: Appearance.font
font.pixelSize: Appearance.fontSize
color: Colors.foreground

View File

@ -3,10 +3,23 @@ import Quickshell
Item {
id: root
implicitWidth: clockText.text.length + 10
// FIX: Real pixels please!
implicitWidth: clockText.implicitWidth
implicitHeight: 30
Text {
id: clockText
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
}
}
}

View File

@ -70,6 +70,7 @@ Item {
PwObjectTracker {
objects: Pipewire.defaultAudioSink
}
font.weight: 900
color: Colors.foreground
font.family: Appearance.font
font.pixelSize: Appearance.fontSize

View File

@ -13,13 +13,10 @@ Item {
Repeater {
id: workspaceRepeater
model: Hyprland.workspaces
Rectangle {
id: workspaceCircle
width: 16
height: 16
radius: 20
width: 18
height: 18
radius: 10
//color: modelData.active ? myPallete.accent : myPallete.window
color: modelData.active ? Colors.foreground : "transparent"
@ -33,6 +30,7 @@ Item {
color: modelData.active ? Colors.background : Colors.foreground // Set contrasting color for workspace number
}
}
model: Hyprland.workspaces
}
}
}

View 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
}
}

View File

@ -1,4 +1,22 @@
//@ pragma UseQApplication
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
}
}
}