mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-24 12:22:09 +00:00
bar: add bottom position
This commit is contained in:
parent
e119d6d582
commit
47a34dc76b
6 changed files with 34 additions and 14 deletions
|
|
@ -46,16 +46,20 @@ Scope {
|
|||
color: "transparent"
|
||||
|
||||
anchors {
|
||||
top: true
|
||||
top: !ConfigOptions.bar.bottom
|
||||
bottom: ConfigOptions.bar.bottom
|
||||
left: true
|
||||
right: true
|
||||
}
|
||||
|
||||
Rectangle { // Bar background
|
||||
id: barContent
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
anchors {
|
||||
right: parent.right
|
||||
left: parent.left
|
||||
top: !ConfigOptions.bar.bottom ? parent.top : undefined
|
||||
bottom: ConfigOptions.bar.bottom ? parent.bottom : undefined
|
||||
}
|
||||
color: showBarBackground ? Appearance.colors.colLayer0 : "transparent"
|
||||
height: barHeight
|
||||
|
||||
|
|
@ -425,23 +429,27 @@ Scope {
|
|||
|
||||
// Round decorators
|
||||
Item {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: barContent.bottom
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
// top: barContent.bottom
|
||||
top: ConfigOptions.bar.bottom ? undefined : barContent.bottom
|
||||
bottom: ConfigOptions.bar.bottom ? barContent.top : undefined
|
||||
}
|
||||
height: Appearance.rounding.screenRounding
|
||||
|
||||
RoundCorner {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
size: Appearance.rounding.screenRounding
|
||||
corner: cornerEnum.topLeft
|
||||
corner: ConfigOptions.bar.bottom ? cornerEnum.bottomLeft : cornerEnum.topLeft
|
||||
color: showBarBackground ? Appearance.colors.colLayer0 : "transparent"
|
||||
}
|
||||
RoundCorner {
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
size: Appearance.rounding.screenRounding
|
||||
corner: cornerEnum.topRight
|
||||
corner: ConfigOptions.bar.bottom ? cornerEnum.bottomRight : cornerEnum.topRight
|
||||
color: showBarBackground ? Appearance.colors.colLayer0 : "transparent"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,10 +22,11 @@ Singleton {
|
|||
}
|
||||
|
||||
property QtObject bar: QtObject {
|
||||
property bool bottom: false // Instead of top
|
||||
property bool borderless: true
|
||||
property int batteryLowThreshold: 20
|
||||
property string topLeftIcon: "spark" // Options: distro, spark
|
||||
property bool showBackground: true
|
||||
property bool borderless: false
|
||||
property QtObject resources: QtObject {
|
||||
property bool alwaysShowSwap: true
|
||||
property bool alwaysShowCpu: false
|
||||
|
|
|
|||
|
|
@ -87,7 +87,8 @@ Scope {
|
|||
WlrLayershell.namespace: "quickshell:mediaControls"
|
||||
|
||||
anchors {
|
||||
top: true
|
||||
top: !ConfigOptions.bar.bottom
|
||||
bottom: ConfigOptions.bar.bottom
|
||||
left: true
|
||||
}
|
||||
mask: Region {
|
||||
|
|
|
|||
|
|
@ -65,7 +65,10 @@ Scope {
|
|||
WlrLayershell.layer: WlrLayer.Overlay
|
||||
color: "transparent"
|
||||
|
||||
anchors.top: true
|
||||
anchors {
|
||||
top: !ConfigOptions.bar.bottom
|
||||
bottom: ConfigOptions.bar.bottom
|
||||
}
|
||||
mask: Region {
|
||||
item: osdValuesWrapper
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,10 @@ Scope {
|
|||
WlrLayershell.layer: WlrLayer.Overlay
|
||||
color: "transparent"
|
||||
|
||||
anchors.top: true
|
||||
anchors {
|
||||
top: !ConfigOptions.bar.bottom
|
||||
bottom: ConfigOptions.bar.bottom
|
||||
}
|
||||
mask: Region {
|
||||
item: osdValuesWrapper
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,11 @@ Scope {
|
|||
ColumnLayout {
|
||||
id: columnLayout
|
||||
visible: GlobalStates.overviewOpen
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
top: !ConfigOptions.bar.bottom ? parent.top : null
|
||||
bottom: ConfigOptions.bar.bottom ? parent.bottom : null
|
||||
}
|
||||
|
||||
Keys.onPressed: (event) => {
|
||||
if (event.key === Qt.Key_Escape) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue