move bar to Shell module
This commit is contained in:
parent
3e3275a84d
commit
b75f8bc1d2
3 changed files with 88 additions and 73 deletions
18
modules/Shell.qml
Normal file
18
modules/Shell.qml
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
import "bar"
|
||||||
|
import Quickshell
|
||||||
|
import Quickshell.Wayland
|
||||||
|
import Quickshell.Hyprland
|
||||||
|
import QtQuick
|
||||||
|
import QtQuick.Effects
|
||||||
|
|
||||||
|
Variants {
|
||||||
|
model: Quickshell.screens
|
||||||
|
|
||||||
|
Scope {
|
||||||
|
id: scope
|
||||||
|
|
||||||
|
required property ShellScreen modelData
|
||||||
|
|
||||||
|
Bar {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -8,107 +8,105 @@ import "components/hyprland"
|
||||||
import "components/notifications"
|
import "components/notifications"
|
||||||
import "components/tray"
|
import "components/tray"
|
||||||
|
|
||||||
Scope {
|
PanelWindow {
|
||||||
PanelWindow {
|
id: parentWindow
|
||||||
id: parentWindow
|
|
||||||
|
|
||||||
anchors.top: true
|
anchors.top: true
|
||||||
anchors.left: true
|
anchors.left: true
|
||||||
anchors.right: true
|
anchors.right: true
|
||||||
|
|
||||||
implicitHeight: Dimensions.bar.height
|
implicitHeight: Dimensions.bar.height
|
||||||
color: 'transparent'
|
color: 'transparent'
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.leftMargin: Dimensions.bar.horizontalMargins
|
||||||
|
anchors.rightMargin: Dimensions.bar.horizontalMargins
|
||||||
|
anchors.topMargin: Dimensions.bar.verticalMargins
|
||||||
|
anchors.bottomMargin: Dimensions.bar.verticalMargins
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: background
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.leftMargin: Dimensions.bar.horizontalMargins
|
color: Theme.palette.base300
|
||||||
anchors.rightMargin: Dimensions.bar.horizontalMargins
|
radius: Dimensions.radius
|
||||||
anchors.topMargin: Dimensions.bar.verticalMargins
|
|
||||||
anchors.bottomMargin: Dimensions.bar.verticalMargins
|
|
||||||
|
|
||||||
Rectangle {
|
border {
|
||||||
id: background
|
color: Theme.palette.base100
|
||||||
anchors.fill: parent
|
width: Dimensions.bar.border
|
||||||
color: Theme.palette.base300
|
pixelAligned: true
|
||||||
radius: Dimensions.radius
|
}
|
||||||
|
}
|
||||||
|
|
||||||
border {
|
RowLayout {
|
||||||
color: Theme.palette.base100
|
id: leftbar
|
||||||
width: Dimensions.bar.border
|
|
||||||
pixelAligned: true
|
anchors.left: parent.left
|
||||||
}
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
|
anchors.leftMargin: Dimensions.bar.horizontalPadding
|
||||||
|
anchors.topMargin: Dimensions.bar.verticalPadding
|
||||||
|
anchors.bottomMargin: Dimensions.bar.verticalPadding
|
||||||
|
|
||||||
|
spacing: Dimensions.bar.spacing
|
||||||
|
|
||||||
|
SystemLogo {
|
||||||
|
implicitSize: 22
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
Workspaces {}
|
||||||
id: leftbar
|
|
||||||
|
|
||||||
anchors.left: parent.left
|
Tray {}
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
}
|
||||||
|
|
||||||
anchors.leftMargin: Dimensions.bar.horizontalPadding
|
RowLayout {
|
||||||
anchors.topMargin: Dimensions.bar.verticalPadding
|
id: centerbar
|
||||||
anchors.bottomMargin: Dimensions.bar.verticalPadding
|
|
||||||
|
|
||||||
spacing: Dimensions.bar.spacing
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
SystemLogo {
|
anchors.topMargin: Dimensions.bar.verticalPadding
|
||||||
implicitSize: 22
|
anchors.bottomMargin: Dimensions.bar.verticalPadding
|
||||||
}
|
|
||||||
|
|
||||||
Workspaces {}
|
spacing: Dimensions.bar.spacing
|
||||||
|
|
||||||
Tray {}
|
Mpris {}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: centerbar
|
id: rightbar
|
||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.right: parent.right
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
anchors.topMargin: Dimensions.bar.verticalPadding
|
anchors.rightMargin: Dimensions.bar.horizontalPadding
|
||||||
anchors.bottomMargin: Dimensions.bar.verticalPadding
|
anchors.topMargin: Dimensions.bar.verticalPadding
|
||||||
|
anchors.bottomMargin: Dimensions.bar.verticalPadding
|
||||||
|
|
||||||
spacing: Dimensions.bar.spacing
|
spacing: Dimensions.bar.spacing
|
||||||
|
|
||||||
Mpris {}
|
Pywal {}
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
Pipewire {}
|
||||||
id: rightbar
|
|
||||||
|
|
||||||
anchors.right: parent.right
|
Caffeine {}
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
|
|
||||||
anchors.rightMargin: Dimensions.bar.horizontalPadding
|
Network {}
|
||||||
anchors.topMargin: Dimensions.bar.verticalPadding
|
|
||||||
anchors.bottomMargin: Dimensions.bar.verticalPadding
|
|
||||||
|
|
||||||
spacing: Dimensions.bar.spacing
|
Bluetooth {}
|
||||||
|
|
||||||
Pywal {}
|
Storage {}
|
||||||
|
|
||||||
Pipewire {}
|
Memory {}
|
||||||
|
|
||||||
Caffeine {}
|
Cpu {}
|
||||||
|
|
||||||
Network {}
|
Gpu {}
|
||||||
|
|
||||||
Bluetooth {}
|
Clock {}
|
||||||
|
|
||||||
Storage {}
|
Notifications {}
|
||||||
|
|
||||||
Memory {}
|
|
||||||
|
|
||||||
Cpu {}
|
|
||||||
|
|
||||||
Gpu {}
|
|
||||||
|
|
||||||
Clock {}
|
|
||||||
|
|
||||||
Notifications {}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,11 @@
|
||||||
|
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import "modules"
|
import "modules"
|
||||||
import "modules/bar"
|
|
||||||
|
|
||||||
ShellRoot {
|
ShellRoot {
|
||||||
ReloadPopup {}
|
ReloadPopup {}
|
||||||
|
|
||||||
Bar {}
|
Shell {}
|
||||||
|
|
||||||
Shortcuts {}
|
Shortcuts {}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue