start dashboard
This commit is contained in:
@@ -19,11 +19,16 @@ PanelWindow {
|
||||
bottom: true
|
||||
}
|
||||
|
||||
Dashboard {
|
||||
id: dash
|
||||
|
||||
radius: root.radius
|
||||
}
|
||||
|
||||
|
||||
Component.onCompleted: {
|
||||
|
||||
//Hyprland.dispatch("exec hyprctl keyword monitor eDP-1,addreserved," + topRect.height + "," + botRect.height + "," + leftRect.width + "," + rightRect.width)
|
||||
Hyprland.dispatch("exec hyprctl keyword monitor eDP-1,addreserved," + (midFO.visible ? midFO.y + midFO.height : topEx) + "," + botEx + "," + leftEx + "," + rightEx)
|
||||
Hyprland.dispatch("exec hyprctl keyword monitor " + Hyprland.monitorFor(root.screen).name + ",addreserved," + (midFO.visible ? midFO.y + midFO.height : topEx) + "," + botEx + "," + leftEx + "," + rightEx)
|
||||
|
||||
}
|
||||
|
||||
@@ -54,7 +59,10 @@ PanelWindow {
|
||||
|
||||
Region {
|
||||
item: midFO.visible ? midFO : topRect
|
||||
//item: midFO
|
||||
}
|
||||
|
||||
Region {
|
||||
item: dash.visible ? dash : topRect
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,9 +78,7 @@ PanelWindow {
|
||||
|
||||
hoverEnabled: true
|
||||
onEntered: {
|
||||
midFO.set = !midFO.set
|
||||
midFO.visible = Qt.binding(() => midFO.set)
|
||||
Hyprland.dispatch("exec hyprctl keyword monitor eDP-1,addreserved," + (midFO.visible ? midFO.y + midFO.height : topEx) + "," + botEx + "," + leftEx + "," + rightEx)
|
||||
midFO.visible = true
|
||||
}
|
||||
//onEntered: midFO.visible = true
|
||||
}
|
||||
@@ -198,6 +204,7 @@ PanelWindow {
|
||||
y: topRect.y + topRect.height - 1
|
||||
window: root
|
||||
radius: root.radius
|
||||
onVisibleChanged: Hyprland.dispatch("exec hyprctl keyword monitor " + Hyprland.monitorFor(root.screen).name + ",addreserved," + (midFO.visible ? midFO.y + midFO.height : topEx) + "," + botEx + "," + leftEx + "," + rightEx)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ VFlyout {
|
||||
|
||||
property QsWindow window
|
||||
|
||||
property real radius
|
||||
|
||||
item: mid
|
||||
|
||||
onExited: visible = false
|
||||
|
||||
RowLayout {
|
||||
id: mid
|
||||
|
||||
@@ -65,6 +65,4 @@ VFlyout {
|
||||
popupOffset: x + midFO.x
|
||||
}
|
||||
}
|
||||
|
||||
radius: radius
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
import Quickshell // for PanelWindow
|
||||
import QtQuick // for Text
|
||||
import QtQuick.Shapes
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Io
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Hyprland
|
||||
|
||||
Item {
|
||||
|
||||
x: parent.width / 2 - width / 2
|
||||
y: 80
|
||||
|
||||
implicitWidth: 700
|
||||
implicitHeight: 400
|
||||
|
||||
required property real radius
|
||||
|
||||
id: root
|
||||
|
||||
visible: true
|
||||
|
||||
WrapperMouseArea {
|
||||
anchors.fill: parent
|
||||
ClippingRectangle {
|
||||
anchors.fill: parent
|
||||
color: Pywal.special.background
|
||||
|
||||
radius: root.radius
|
||||
}
|
||||
|
||||
hoverEnabled: true
|
||||
onExited: root.visible = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ WrapperMouseArea {
|
||||
Process {
|
||||
id: launcher
|
||||
running: false
|
||||
command: ["rofi", "-show", "drun"]
|
||||
command: ["rofi", "-show", "drun", "-show-icons" ]
|
||||
}
|
||||
|
||||
onClicked: launcher.running = true
|
||||
|
||||
@@ -27,31 +27,31 @@ Singleton {
|
||||
property string alpha: "100"
|
||||
|
||||
property JsonObject special: JsonObject {
|
||||
property string background: "white"
|
||||
property string foreground: "white"
|
||||
property string cursor: "white"
|
||||
property string background: "transparent"
|
||||
property string foreground: "transparent"
|
||||
property string cursor: "transparent"
|
||||
}
|
||||
|
||||
property JsonObject colors: JsonObject {
|
||||
property string color0: "white"
|
||||
property string color1: "white"
|
||||
property string color2: "white"
|
||||
property string color3: "white"
|
||||
property string color0: "transparent"
|
||||
property string color1: "transparent"
|
||||
property string color2: "transparent"
|
||||
property string color3: "transparent"
|
||||
|
||||
property string color4: "white"
|
||||
property string color5: "white"
|
||||
property string color6: "white"
|
||||
property string color7: "white"
|
||||
property string color4: "transparent"
|
||||
property string color5: "transparent"
|
||||
property string color6: "transparent"
|
||||
property string color7: "transparent"
|
||||
|
||||
property string color8: "white"
|
||||
property string color9: "white"
|
||||
property string color10: "white"
|
||||
property string color11: "white"
|
||||
property string color8: "transparent"
|
||||
property string color9: "transparent"
|
||||
property string color10: "transparent"
|
||||
property string color11: "transparent"
|
||||
|
||||
property string color12: "white"
|
||||
property string color13: "white"
|
||||
property string color14: "white"
|
||||
property string color15: "white"
|
||||
property string color12: "transparent"
|
||||
property string color13: "transparent"
|
||||
property string color14: "transparent"
|
||||
property string color15: "transparent"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import Quickshell.Widgets
|
||||
MouseArea {
|
||||
id: root
|
||||
|
||||
property real radius: 10
|
||||
required property real radius
|
||||
property real pad: 5
|
||||
property color color
|
||||
|
||||
@@ -34,51 +34,51 @@ MouseArea {
|
||||
strokeColor: root.color
|
||||
fillColor: root.color
|
||||
|
||||
startX: -radius - pad; startY: 0
|
||||
startX: -root.radius - pad; startY: 0
|
||||
|
||||
PathArc {
|
||||
radiusX: radius
|
||||
radiusY: radius
|
||||
radiusX: root.radius
|
||||
radiusY: root.radius
|
||||
|
||||
relativeX: radius
|
||||
relativeY: radius
|
||||
relativeX: root.radius
|
||||
relativeY: root.radius
|
||||
}
|
||||
|
||||
PathLine { relativeX: 0; relativeY: 2 * pad + item.height - 2 * radius }
|
||||
PathLine { relativeX: 0; relativeY: 2 * pad + item.height - 2 * root.radius }
|
||||
|
||||
PathArc {
|
||||
radiusX: radius
|
||||
radiusY: radius
|
||||
radiusX: root.radius
|
||||
radiusY: root.radius
|
||||
|
||||
direction: PathArc.Counterclockwise
|
||||
|
||||
relativeX: radius
|
||||
relativeY: radius
|
||||
relativeX: root.radius
|
||||
relativeY: root.radius
|
||||
}
|
||||
|
||||
PathLine { x: item.width + pad - radius; relativeY: 0 }
|
||||
PathLine { x: item.width + pad - root.radius; relativeY: 0 }
|
||||
|
||||
PathArc {
|
||||
radiusX: radius
|
||||
radiusY: radius
|
||||
radiusX: root.radius
|
||||
radiusY: root.radius
|
||||
|
||||
direction: PathArc.Counterclockwise
|
||||
|
||||
relativeX: radius
|
||||
relativeY: -radius
|
||||
relativeX: root.radius
|
||||
relativeY: -root.radius
|
||||
}
|
||||
|
||||
PathLine { relativeX: 0; relativeY: -item.height + 2 * radius - 2 * pad }
|
||||
PathLine { relativeX: 0; relativeY: -item.height + 2 * root.radius - 2 * pad }
|
||||
|
||||
PathArc {
|
||||
radiusX: radius
|
||||
radiusY: radius
|
||||
radiusX: root.radius
|
||||
radiusY: root.radius
|
||||
|
||||
relativeX: radius
|
||||
relativeY: -radius
|
||||
relativeX: root.radius
|
||||
relativeY: -root.radius
|
||||
}
|
||||
|
||||
PathLine { x: -radius - pad; y: 0 }
|
||||
PathLine { x: -root.radius - pad; y: 0 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user