From 2087ea72f80a5efd8e3c818fa6a0c6d11b445a4d Mon Sep 17 00:00:00 2001 From: xB Date: Fri, 6 Jun 2025 00:47:26 +0300 Subject: [PATCH] QS Rewrite: bar: Add an option for choosing screens --- .config/quickshell/modules/bar/Bar.qml | 3 +++ .config/quickshell/modules/common/ConfigOptions.qml | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/.config/quickshell/modules/bar/Bar.qml b/.config/quickshell/modules/bar/Bar.qml index 891c9a2c8..6c5e2a865 100644 --- a/.config/quickshell/modules/bar/Bar.qml +++ b/.config/quickshell/modules/bar/Bar.qml @@ -26,6 +26,9 @@ Scope { id: barRoot screen: modelData + // Check screensList from config, If no screens are specified, show on all screens + visible: ConfigOptions.bar.screensList.includes(modelData.name) || ConfigOptions.bar.screensList.length === 0 + property ShellScreen modelData property var brightnessMonitor: Brightness.getMonitorForScreen(modelData) property real useShortenedForm: (Appearance.sizes.barHellaShortenScreenWidthThreshold >= screen.width) ? 2 : diff --git a/.config/quickshell/modules/common/ConfigOptions.qml b/.config/quickshell/modules/common/ConfigOptions.qml index 91ba70408..98abcf364 100644 --- a/.config/quickshell/modules/common/ConfigOptions.qml +++ b/.config/quickshell/modules/common/ConfigOptions.qml @@ -36,6 +36,10 @@ Singleton { property bool alwaysShowSwap: true property bool alwaysShowCpu: false } + property list screensList: [ + "HDMI-A-1", + "DP-1" + ] property QtObject workspaces: QtObject { property int shown: 10 property bool alwaysShowNumbers: false