non important commit
This commit is contained in:
parent
cb2c336e17
commit
069a5df2b9
7 changed files with 259 additions and 171 deletions
1
configuration/modules/dots/quick_shell/config/.qmlls.ini
Symbolic link
1
configuration/modules/dots/quick_shell/config/.qmlls.ini
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
/run/user/1000/quickshell/vfs/740f0dbe5bf608b9ce0b8dffafd96492/.qmlls.ini
|
||||
86
configuration/modules/dots/quick_shell/config/PowerPopup.qml
Normal file
86
configuration/modules/dots/quick_shell/config/PowerPopup.qml
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
PanelWindow {
|
||||
id: powerPopup
|
||||
|
||||
required property bool expanderOpen
|
||||
required property color bgColor
|
||||
required property color recColor
|
||||
required property int recRadius
|
||||
required property int barWidth
|
||||
|
||||
anchors.left: true
|
||||
anchors.bottom: true
|
||||
implicitWidth: (expanderOpen || powerAnim.running) ? 140 : 0
|
||||
implicitHeight: (expanderOpen || powerAnim.running) ? 100 : 0
|
||||
color: "transparent"
|
||||
|
||||
Rectangle {
|
||||
id: powerRectangle
|
||||
|
||||
y: parent.height - height
|
||||
x: powerPopup.expanderOpen ? 0 : -(width + powerPopup.barWidth)
|
||||
width: 140
|
||||
height: 100
|
||||
color: powerPopup.bgColor
|
||||
|
||||
Behavior on x {
|
||||
NumberAnimation {
|
||||
id: powerAnim
|
||||
|
||||
duration: 400
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
anchors.centerIn: powerRectangle
|
||||
spacing: 10
|
||||
|
||||
Rectangle {
|
||||
color: powerPopup.recColor
|
||||
width: 50
|
||||
height: 50
|
||||
radius: powerPopup.recRadius * 2
|
||||
|
||||
Button {
|
||||
anchors.fill: parent
|
||||
opacity: 0
|
||||
|
||||
onClicked: Quickshell.execDetached(["poweroff"])
|
||||
}
|
||||
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
source: "file://" + Quickshell.shellDir + "/assets/power.svg"
|
||||
sourceSize.width: 28
|
||||
sourceSize.height: 28
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
color: powerPopup.recColor
|
||||
width: 50
|
||||
height: 50
|
||||
radius: powerPopup.recRadius * 2
|
||||
|
||||
Button {
|
||||
anchors.fill: parent
|
||||
opacity: 0
|
||||
|
||||
onClicked: Quickshell.execDetached(["reboot"])
|
||||
}
|
||||
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
source: "file://" + Quickshell.shellDir + "/assets/reboot.svg"
|
||||
sourceSize.width: 28
|
||||
sourceSize.height: 28
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
135
configuration/modules/dots/quick_shell/config/SideBar.qml
Normal file
135
configuration/modules/dots/quick_shell/config/SideBar.qml
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
PanelWindow {
|
||||
id: sideBar
|
||||
|
||||
required property var clock
|
||||
required property color bgColor
|
||||
required property color recColor
|
||||
required property color fontColor
|
||||
required property int fontSize
|
||||
required property int barWidth
|
||||
required property int recRadius
|
||||
required property int recLength
|
||||
required property int myMargin
|
||||
required property int edgeMargin
|
||||
|
||||
required property bool expanderOpen
|
||||
|
||||
anchors.top: true
|
||||
anchors.left: true
|
||||
anchors.bottom: true
|
||||
|
||||
implicitWidth: sideBar.barWidth
|
||||
color: sideBar.bgColor
|
||||
|
||||
Rectangle {
|
||||
id: logo
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
top: parent.top
|
||||
topMargin: sideBar.edgeMargin
|
||||
}
|
||||
implicitHeight: sideBar.recLength
|
||||
implicitWidth: sideBar.recLength
|
||||
radius: sideBar.recRadius
|
||||
color: sideBar.recColor
|
||||
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
source: "file://" + Quickshell.shellDir + "/assets/logo.svg"
|
||||
sourceSize.width: 30
|
||||
sourceSize.height: 30
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: workspaces
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
top: logo.bottom
|
||||
topMargin: sideBar.myMargin
|
||||
}
|
||||
implicitHeight: 200
|
||||
implicitWidth: sideBar.recLength
|
||||
radius: sideBar.recRadius
|
||||
color: sideBar.recColor
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
color: sideBar.fontColor
|
||||
font.pixelSize: sideBar.fontSize
|
||||
text: "ws"
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: notifications
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
bottom: time.top
|
||||
bottomMargin: sideBar.myMargin
|
||||
}
|
||||
implicitHeight: sideBar.recLength
|
||||
implicitWidth: sideBar.recLength
|
||||
radius: sideBar.recRadius
|
||||
color: sideBar.recColor
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
color: sideBar.fontColor
|
||||
font.pixelSize: sideBar.fontSize
|
||||
text: "notif"
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: time
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
bottom: power.top
|
||||
bottomMargin: sideBar.myMargin
|
||||
}
|
||||
implicitHeight: sideBar.recLength
|
||||
implicitWidth: sideBar.recLength
|
||||
radius: sideBar.recRadius
|
||||
color: sideBar.recColor
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
color: sideBar.fontColor
|
||||
font.pixelSize: sideBar.fontSize
|
||||
text: Qt.formatDateTime(sideBar.clock.date, "hh\nmm")
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: power
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
bottom: parent.bottom
|
||||
bottomMargin: sideBar.edgeMargin
|
||||
}
|
||||
implicitHeight: sideBar.recLength
|
||||
implicitWidth: sideBar.recLength
|
||||
radius: sideBar.recRadius
|
||||
color: sideBar.recColor
|
||||
|
||||
Button {
|
||||
anchors.fill: parent
|
||||
opacity: 0
|
||||
onClicked: sideBar.expanderOpen = !sideBar.expanderOpen
|
||||
}
|
||||
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
source: "file://" + Quickshell.shellDir + "/assets/power.svg"
|
||||
sourceSize.width: 28
|
||||
sourceSize.height: 28
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" ?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3 11.9998C3 7.02919 7.02944 2.99976 12 2.99976C14.8273 2.99976 17.35 4.30342 19 6.34242" stroke="#292929" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path d="M19.5 2.99976L19.5 6.99976L15.5 6.99976" stroke="#292929" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path d="M21 11.9998C21 16.9703 16.9706 20.9998 12 20.9998C9.17273 20.9998 6.64996 19.6961 5 17.6571" stroke="#292929" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path d="M4.5 20.9998L4.5 16.9998L8.5 16.9998" stroke="#292929" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
|
||||
|
After Width: | Height: | Size: 836 B |
|
|
@ -2,7 +2,6 @@ pragma ComponentBehavior: Bound
|
|||
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
ShellRoot {
|
||||
id: root
|
||||
|
|
@ -17,8 +16,6 @@ ShellRoot {
|
|||
property int myMargin: 10
|
||||
property int edgeMargin: 15
|
||||
|
||||
property bool expanderOpen: false
|
||||
|
||||
SystemClock {
|
||||
id: clock
|
||||
precision: SystemClock.Minutes
|
||||
|
|
@ -27,178 +24,35 @@ ShellRoot {
|
|||
Variants {
|
||||
model: Quickshell.screens
|
||||
|
||||
PanelWindow {
|
||||
property var modelData
|
||||
delegate: Scope {
|
||||
id: delegate
|
||||
required property var modelData
|
||||
|
||||
screen: modelData
|
||||
anchors.top: true
|
||||
anchors.left: true
|
||||
anchors.bottom: true
|
||||
property bool expanderOpen: false
|
||||
|
||||
implicitWidth: root.barWidth
|
||||
color: root.bgColor
|
||||
|
||||
Rectangle {
|
||||
id: logo
|
||||
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
top: parent.top
|
||||
topMargin: root.edgeMargin
|
||||
}
|
||||
|
||||
implicitHeight: root.recLength
|
||||
implicitWidth: root.recLength
|
||||
color: root.recColor
|
||||
|
||||
bottomLeftRadius: root.recRadius
|
||||
bottomRightRadius: root.recRadius
|
||||
topLeftRadius: root.recRadius
|
||||
topRightRadius: root.recRadius
|
||||
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
source: "file://" + Quickshell.shellDir + "/assets/logo.svg"
|
||||
|
||||
sourceSize.width: 30
|
||||
sourceSize.height: 30
|
||||
}
|
||||
SideBar {
|
||||
clock: clock
|
||||
screen: delegate.modelData
|
||||
bgColor: root.bgColor
|
||||
recColor: root.recColor
|
||||
fontColor: root.fontColor
|
||||
fontSize: root.fontSize
|
||||
barWidth: root.barWidth
|
||||
recRadius: root.recRadius
|
||||
recLength: root.recLength
|
||||
myMargin: root.myMargin
|
||||
edgeMargin: root.edgeMargin
|
||||
expanderOpen: delegate.expanderOpen
|
||||
onExpanderOpenChanged: delegate.expanderOpen = expanderOpen
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: workspaces
|
||||
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
top: logo.bottom
|
||||
topMargin: root.myMargin
|
||||
}
|
||||
|
||||
implicitHeight: 200
|
||||
implicitWidth: root.recLength
|
||||
color: root.recColor
|
||||
|
||||
bottomLeftRadius: root.recRadius
|
||||
bottomRightRadius: root.recRadius
|
||||
topLeftRadius: root.recRadius
|
||||
topRightRadius: root.recRadius
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
color: root.fontColor
|
||||
font.pixelSize: root.fontSize
|
||||
text: "ws"
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: notifications
|
||||
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
bottom: time.top
|
||||
bottomMargin: root.myMargin
|
||||
}
|
||||
|
||||
implicitHeight: root.recLength
|
||||
implicitWidth: root.recLength
|
||||
color: root.recColor
|
||||
|
||||
bottomLeftRadius: root.recRadius
|
||||
bottomRightRadius: root.recRadius
|
||||
topLeftRadius: root.recRadius
|
||||
topRightRadius: root.recRadius
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
color: root.fontColor
|
||||
font.pixelSize: root.fontSize
|
||||
text: "notif"
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: time
|
||||
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
bottom: power.top
|
||||
bottomMargin: root.myMargin
|
||||
}
|
||||
|
||||
implicitHeight: root.recLength
|
||||
implicitWidth: root.recLength
|
||||
color: root.recColor
|
||||
|
||||
bottomLeftRadius: root.recRadius
|
||||
bottomRightRadius: root.recRadius
|
||||
topLeftRadius: root.recRadius
|
||||
topRightRadius: root.recRadius
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
color: root.fontColor
|
||||
font.pixelSize: root.fontSize
|
||||
text: Qt.formatDateTime(clock.date, "hh\nmm")
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
id: power
|
||||
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
bottom: parent.bottom
|
||||
bottomMargin: root.edgeMargin
|
||||
}
|
||||
|
||||
implicitHeight: root.recLength - 4
|
||||
implicitWidth: root.recLength - 4
|
||||
|
||||
onClicked: root.expanderOpen = !root.expanderOpen
|
||||
|
||||
Rectangle {
|
||||
anchors.centerIn: parent
|
||||
|
||||
implicitHeight: root.recLength
|
||||
implicitWidth: root.recLength
|
||||
color: root.recColor
|
||||
|
||||
bottomLeftRadius: root.recRadius
|
||||
bottomRightRadius: root.recRadius
|
||||
topLeftRadius: root.recRadius
|
||||
topRightRadius: root.recRadius
|
||||
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
source: "file://" + Quickshell.shellDir + "/assets/power.svg"
|
||||
|
||||
sourceSize.width: 28
|
||||
sourceSize.height: 28
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PanelWindow {
|
||||
visible: root.expanderOpen
|
||||
|
||||
anchors.left: true
|
||||
anchors.bottom: true
|
||||
|
||||
implicitWidth: 200
|
||||
implicitHeight: 150
|
||||
color: "transparent"
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: root.recColor
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
color: root.fontColor
|
||||
text: "Power Menu"
|
||||
PowerPopup {
|
||||
screen: delegate.modelData
|
||||
expanderOpen: delegate.expanderOpen
|
||||
bgColor: root.bgColor
|
||||
recColor: root.recColor
|
||||
recRadius: root.recRadius
|
||||
barWidth: root.barWidth
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue