From d1822be2a9da05db0a07d574a2b71d732ec871fe Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Tue, 17 Jun 2025 19:05:07 +0200 Subject: [PATCH] center-right block click to open right sidebar (closes #1442) --- .config/quickshell/modules/bar/Bar.qml | 37 +++++++++++++++++--------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/.config/quickshell/modules/bar/Bar.qml b/.config/quickshell/modules/bar/Bar.qml index 9fb9b32ed..925ac1406 100644 --- a/.config/quickshell/modules/bar/Bar.qml +++ b/.config/quickshell/modules/bar/Bar.qml @@ -240,25 +240,36 @@ Scope { VerticalBarSeparator {visible: ConfigOptions?.bar.borderless} - BarGroup { + MouseArea { id: rightCenterGroup + implicitWidth: rightCenterGroupContent.implicitWidth + implicitHeight: rightCenterGroupContent.implicitHeight Layout.preferredWidth: barRoot.centerSideModuleWidth Layout.fillHeight: true - - ClockWidget { - showDate: (ConfigOptions.bar.verbose && barRoot.useShortenedForm < 2) - Layout.alignment: Qt.AlignVCenter - Layout.fillWidth: true + + onPressed: { + Hyprland.dispatch('global quickshell:sidebarRightToggle') } - UtilButtons { - visible: (ConfigOptions.bar.verbose && barRoot.useShortenedForm === 0) - Layout.alignment: Qt.AlignVCenter - } + BarGroup { + id: rightCenterGroupContent + anchors.fill: parent + + ClockWidget { + showDate: (ConfigOptions.bar.verbose && barRoot.useShortenedForm < 2) + Layout.alignment: Qt.AlignVCenter + Layout.fillWidth: true + } - BatteryIndicator { - visible: (barRoot.useShortenedForm < 2 && UPower.displayDevice.isLaptopBattery) - Layout.alignment: Qt.AlignVCenter + UtilButtons { + visible: (ConfigOptions.bar.verbose && barRoot.useShortenedForm === 0) + Layout.alignment: Qt.AlignVCenter + } + + BatteryIndicator { + visible: (barRoot.useShortenedForm < 2 && UPower.displayDevice.isLaptopBattery) + Layout.alignment: Qt.AlignVCenter + } } }