This commit is contained in:
2026-03-29 13:16:40 -05:00
parent adcd560180
commit 7a15a983af
26 changed files with 685 additions and 423 deletions

View File

@@ -12,7 +12,22 @@ PanelWindow {
property real radius: 10
onRadiusChanged: Hyprland.dispatch("exec hyprctl keyword decoration:rounding " + radius)
property list<string> hyprcmds: [
"exec hyprctl --batch '" +
"keyword general:gaps_out 5;" +
"keyword general:border_size 1;" +
"keyword windowrule match:title lockscreen, no_blur on, fullscreen on;" +
"keyword misc:session_lock_xray true;" +
"keyword decoration:blur:enabled true;" +
"keyword decoration:active_opacity 0.96;" +
"keyword decoration:inactive_opacity 0.96;" +
"keyword decoration:rounding " + radius + ";" +
"keyword monitor " + Hyprland.monitorFor(root.screen).name + ",1920x1080@60,0x0,1" + ";" +
"keyword monitor " + Hyprland.monitorFor(root.screen).name + ",addreserved," + topEx + "," + botEx + "," + leftEx + "," + rightEx + ";" +
"'"
]
onRadiusChanged: root.hyprcmds.forEach((c) => Hyprland.dispatch(c))
anchors {
top: true
@@ -21,32 +36,10 @@ PanelWindow {
bottom: true
}
Lock {
id: lock
bg_path: "/tmp/nathan/tmp.jpg"
//locked: true
}
Timer {
id: lt
interval: 30000
running: false
repeat: false
onTriggered: lock.locked = false
}
Component.onCompleted: {
Hyprland.dispatch("exec hyprctl keyword monitor " + Hyprland.monitorFor(root.screen).name + ",addreserved," + topEx + "," + botEx + "," + leftEx + "," + rightEx)
Hyprland.dispatch("exec hyprctl keyword decoration:rounding " + radius)
for(let toplv = 0; toplv < Hyprland.toplevels.values.length; toplv++) {
//console.log(Hyprland.toplevels.values[toplv].title)
}
root.hyprcmds.forEach((c) => { Hyprland.dispatch(c) })
}
property int topEx: topRect.reserve
@@ -55,6 +48,7 @@ PanelWindow {
property int leftEx: leftRect.reserve
property int rightEx: rightRect.reserve
property color bg: (Pywal.special.background)
id: root
@@ -81,43 +75,47 @@ PanelWindow {
Region {
item: dash.visible ? dash : leftRect
}
Region {
item: botRect
}
Region {
item: botRect.midFO.visible ? botRect.midFO : botRect
}
}
BarBottom {
id: botRect
radius: root.radius
hyprcmds: root.hyprcmds
x: leftRect.x + leftRect.width
implicitWidth: rightRect.x - (leftRect.x + leftRect.width)
color: root.bg
}
BarLeft {
id: leftRect
window: root
Button {
implicitWidth: 30
implicitHeight: 30
x: leftRect.x + leftRect.width / 2 - width / 2
y: 200
onClicked: {
lock.locked = true
lt.running = true
}
}
color: root.bg
}
BarRight {
id: rightRect
color: root.bg
}
Shape {
x: leftRect.x + leftRect.width - 1
x: leftRect.cornerX
y: topRect.cornerY
ShapePath {
strokeWidth: 4
strokeColor: Pywal.special.background
fillColor: Pywal.special.background
strokeWidth: 1
strokeColor: "transparent"
fillColor: Pywal.argb(Pywal.special.background)
startX: 0; startY: 0
PathLine { relativeX: 0; relativeY: radius }
@@ -132,13 +130,15 @@ PanelWindow {
}
Shape {
x: rightRect.x + 1
x: rightRect.x
y: topRect.cornerY
ShapePath {
strokeWidth: 4
strokeColor: Pywal.special.background
fillColor: Pywal.special.background
strokeWidth: 1
strokeColor: "transparent"
fillColor: Pywal.argb(Pywal.special.background)
startX: 0; startY: 0
PathLine { relativeX: 0; relativeY: radius }
@@ -154,13 +154,15 @@ PanelWindow {
}
Shape {
x: leftRect.x + leftRect.width - 1
y: botRect.y + 1
x: leftRect.cornerX
y: botRect.cornerY
ShapePath {
strokeWidth: 4
strokeColor: Pywal.special.background
fillColor: Pywal.special.background
strokeWidth: 1
strokeColor: "transparent"
fillColor: Pywal.argb(Pywal.special.background)
startX: 0; startY: 0
PathLine { relativeX: 0; relativeY: -radius }
@@ -176,13 +178,14 @@ PanelWindow {
}
Shape {
x: rightRect.x + 1
y: botRect.y + 1
x: rightRect.x
y: botRect.cornerY
ShapePath {
strokeWidth: 4
strokeColor: Pywal.special.background
fillColor: Pywal.special.background
strokeWidth: 1
strokeColor: "transparent"
fillColor: Pywal.argb(Pywal.special.background)
startX: 0; startY: 0
PathLine { relativeX: 0; relativeY: -radius }
@@ -203,6 +206,7 @@ PanelWindow {
//y: topRect.y + topRect.height - 1
window: root
radius: root.radius
color: root.bg
onShowDashChanged: dash.visible = showDash
}