mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-25 12:52:09 +00:00
bar: introduce borderless mode
This commit is contained in:
parent
9816314749
commit
e57bf529cd
7 changed files with 14 additions and 6 deletions
|
|
@ -8,6 +8,7 @@ import Quickshell.Services.UPower
|
|||
|
||||
Rectangle {
|
||||
id: root
|
||||
property bool borderless: ConfigOptions.bar.borderless
|
||||
readonly property var chargeState: UPower.displayDevice.state
|
||||
readonly property bool isCharging: chargeState == UPowerDeviceState.Charging
|
||||
readonly property bool isPluggedIn: isCharging || chargeState == UPowerDeviceState.PendingCharge
|
||||
|
|
@ -18,7 +19,7 @@ Rectangle {
|
|||
|
||||
implicitWidth: rowLayout.implicitWidth + rowLayout.spacing * 2
|
||||
implicitHeight: 32
|
||||
color: Appearance.colors.colLayer1
|
||||
color: borderless ? "transparent" : Appearance.colors.colLayer1
|
||||
radius: Appearance.rounding.small
|
||||
|
||||
RowLayout {
|
||||
|
|
|
|||
|
|
@ -5,9 +5,10 @@ import QtQuick
|
|||
import QtQuick.Layouts
|
||||
|
||||
Rectangle {
|
||||
property bool borderless: ConfigOptions.bar.borderless
|
||||
implicitWidth: rowLayout.implicitWidth + rowLayout.spacing * 6 // idk, text seems nicer w/ more padding
|
||||
implicitHeight: 32
|
||||
color: Appearance.colors.colLayer1
|
||||
color: borderless ? "transparent" : Appearance.colors.colLayer1
|
||||
radius: Appearance.rounding.small
|
||||
|
||||
RowLayout {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import Quickshell.Hyprland
|
|||
|
||||
Item {
|
||||
id: root
|
||||
property bool borderless: ConfigOptions.bar.borderless
|
||||
readonly property MprisPlayer activePlayer: MprisController.activePlayer
|
||||
readonly property string cleanedTitle: StringUtils.cleanMusicTitle(activePlayer?.trackTitle) || qsTr("No media")
|
||||
|
||||
|
|
@ -45,7 +46,7 @@ Item {
|
|||
anchors.centerIn: parent
|
||||
width: parent.width
|
||||
implicitHeight: 32
|
||||
color: Appearance.colors.colLayer1
|
||||
color: borderless ? "transparent" : Appearance.colors.colLayer1
|
||||
radius: Appearance.rounding.small
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,9 +8,10 @@ import Quickshell.Io
|
|||
import Quickshell.Services.Mpris
|
||||
|
||||
Rectangle {
|
||||
property bool borderless: ConfigOptions.bar.borderless
|
||||
implicitWidth: rowLayout.implicitWidth + rowLayout.anchors.leftMargin + rowLayout.anchors.rightMargin
|
||||
implicitHeight: 32
|
||||
color: Appearance.colors.colLayer1
|
||||
color: borderless ? "transparent" : Appearance.colors.colLayer1
|
||||
radius: Appearance.rounding.small
|
||||
|
||||
RowLayout {
|
||||
|
|
|
|||
|
|
@ -7,10 +7,12 @@ import Quickshell.Io
|
|||
import Quickshell.Hyprland
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
property bool borderless: ConfigOptions.bar.borderless
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
implicitWidth: rowLayout.implicitWidth + rowLayout.spacing * 2
|
||||
implicitHeight: 32
|
||||
color: Appearance.colors.colLayer1
|
||||
color: borderless ? "transparent" : Appearance.colors.colLayer1
|
||||
radius: Appearance.rounding.small
|
||||
|
||||
RowLayout {
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import Qt5Compat.GraphicalEffects
|
|||
|
||||
Item {
|
||||
required property var bar
|
||||
property bool borderless: ConfigOptions.bar.borderless
|
||||
readonly property HyprlandMonitor monitor: Hyprland.monitorFor(bar.screen)
|
||||
readonly property Toplevel activeWindow: ToplevelManager.activeToplevel
|
||||
|
||||
|
|
@ -66,7 +67,7 @@ Item {
|
|||
implicitHeight: 32
|
||||
implicitWidth: rowLayout.implicitWidth + widgetPadding * 2
|
||||
radius: Appearance.rounding.small
|
||||
color: Appearance.colors.colLayer1
|
||||
color: borderless ? "transparent" : Appearance.colors.colLayer1
|
||||
}
|
||||
|
||||
// Scroll to switch workspaces
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ Singleton {
|
|||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue