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