forked from Shinonome/dots-hyprland
bar: allow hiding bg
This commit is contained in:
@@ -18,6 +18,7 @@ Scope {
|
|||||||
readonly property int barHeight: Appearance.sizes.barHeight
|
readonly property int barHeight: Appearance.sizes.barHeight
|
||||||
readonly property int barCenterSideModuleWidth: Appearance.sizes.barCenterSideModuleWidth
|
readonly property int barCenterSideModuleWidth: Appearance.sizes.barCenterSideModuleWidth
|
||||||
readonly property int osdHideMouseMoveThreshold: 20
|
readonly property int osdHideMouseMoveThreshold: 20
|
||||||
|
property bool showBarBackground: ConfigOptions.bar.showBackground
|
||||||
|
|
||||||
Variants { // For each monitor
|
Variants { // For each monitor
|
||||||
model: Quickshell.screens
|
model: Quickshell.screens
|
||||||
@@ -30,7 +31,7 @@ Scope {
|
|||||||
screen: modelData
|
screen: modelData
|
||||||
WlrLayershell.namespace: "quickshell:bar"
|
WlrLayershell.namespace: "quickshell:bar"
|
||||||
height: barHeight + Appearance.rounding.screenRounding
|
height: barHeight + Appearance.rounding.screenRounding
|
||||||
exclusiveZone: barHeight
|
exclusiveZone: showBarBackground ? barHeight : (barHeight - 4)
|
||||||
mask: Region {
|
mask: Region {
|
||||||
item: barContent
|
item: barContent
|
||||||
}
|
}
|
||||||
@@ -47,7 +48,7 @@ Scope {
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
color: Appearance.colors.colLayer0
|
color: showBarBackground ? Appearance.colors.colLayer0 : "transparent"
|
||||||
height: barHeight
|
height: barHeight
|
||||||
|
|
||||||
RowLayout { // Left section
|
RowLayout { // Left section
|
||||||
@@ -324,14 +325,14 @@ Scope {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
size: Appearance.rounding.screenRounding
|
size: Appearance.rounding.screenRounding
|
||||||
corner: cornerEnum.topLeft
|
corner: cornerEnum.topLeft
|
||||||
color: Appearance.colors.colLayer0
|
color: showBarBackground ? Appearance.colors.colLayer0 : "transparent"
|
||||||
}
|
}
|
||||||
RoundCorner {
|
RoundCorner {
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
size: Appearance.rounding.screenRounding
|
size: Appearance.rounding.screenRounding
|
||||||
corner: cornerEnum.topRight
|
corner: cornerEnum.topRight
|
||||||
color: Appearance.colors.colLayer0
|
color: showBarBackground ? Appearance.colors.colLayer0 : "transparent"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ Singleton {
|
|||||||
property QtObject bar: QtObject {
|
property QtObject bar: QtObject {
|
||||||
property int batteryLowThreshold: 20
|
property int batteryLowThreshold: 20
|
||||||
property string topLeftIcon: "spark" // Options: distro, spark
|
property string topLeftIcon: "spark" // Options: distro, spark
|
||||||
|
property bool showBackground: true
|
||||||
property QtObject resources: QtObject {
|
property QtObject resources: QtObject {
|
||||||
property bool alwaysShowSwap: true
|
property bool alwaysShowSwap: true
|
||||||
property bool alwaysShowCpu: false
|
property bool alwaysShowCpu: false
|
||||||
|
|||||||
Reference in New Issue
Block a user