From 0caf72a78f7730567af0c2f5edb6a58eb8d8f7c0 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Thu, 19 Jun 2025 17:21:28 +0200 Subject: [PATCH] make right sidebar open qs settings app --- .config/quickshell/modules/common/ConfigOptions.qml | 1 - .config/quickshell/modules/sidebarRight/SidebarRight.qml | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.config/quickshell/modules/common/ConfigOptions.qml b/.config/quickshell/modules/common/ConfigOptions.qml index 230dfa4c8..58331e368 100644 --- a/.config/quickshell/modules/common/ConfigOptions.qml +++ b/.config/quickshell/modules/common/ConfigOptions.qml @@ -33,7 +33,6 @@ Singleton { property string bluetooth: "kcmshell6 kcm_bluetooth" property string network: "plasmawindowed org.kde.plasma.networkmanagement" property string networkEthernet: "kcmshell6 kcm_networkmanagement" - property string settings: "systemsettings" property string taskManager: "plasma-systemmonitor --page-name Processes" property string terminal: "kitty -1" // This is only for shell actions } diff --git a/.config/quickshell/modules/sidebarRight/SidebarRight.qml b/.config/quickshell/modules/sidebarRight/SidebarRight.qml index ed9788f0e..52ddae7d9 100644 --- a/.config/quickshell/modules/sidebarRight/SidebarRight.qml +++ b/.config/quickshell/modules/sidebarRight/SidebarRight.qml @@ -3,6 +3,7 @@ import "root:/services" import "root:/modules/common" import "root:/modules/common/widgets" import "root:/modules/common/functions/string_utils.js" as StringUtils +import "root:/modules/common/functions/file_utils.js" as FileUtils import "./quickToggles/" import QtQuick import QtQuick.Controls @@ -16,8 +17,10 @@ import Quickshell.Wayland import Quickshell.Hyprland Scope { + id: root property int sidebarWidth: Appearance.sizes.sidebarWidth property int sidebarPadding: 15 + property string settingsQmlPath: FileUtils.trimFileProtocol(`${Directories.config}/quickshell/settings.qml`) PanelWindow { id: sidebarRoot @@ -143,11 +146,11 @@ Scope { toggled: false buttonIcon: "settings" onClicked: { - Hyprland.dispatch(`exec ${ConfigOptions.apps.settings}`) - Hyprland.dispatch(`global quickshell:sidebarRightClose`) + Hyprland.dispatch("global quickshell:sidebarRightClose") + Hyprland.dispatch(`exec qs -p '${root.settingsQmlPath}'`) } StyledToolTip { - content: qsTr("Plasma Settings") + content: qsTr("Settings") } } QuickToggleButton {