diff --git a/.config/quickshell/ii/modules/sidebarRight/SidebarRight.qml b/.config/quickshell/ii/modules/sidebarRight/SidebarRight.qml index 835e373be..6f77145ff 100644 --- a/.config/quickshell/ii/modules/sidebarRight/SidebarRight.qml +++ b/.config/quickshell/ii/modules/sidebarRight/SidebarRight.qml @@ -16,7 +16,7 @@ import Quickshell.Hyprland Scope { id: root property int sidebarWidth: Appearance.sizes.sidebarWidth - property int sidebarPadding: 15 + property int sidebarPadding: 12 property string settingsQmlPath: Quickshell.configPath("settings.qml") PanelWindow { @@ -91,9 +91,9 @@ Scope { radius: Appearance.rounding.screenRounding - Appearance.sizes.hyprlandGapsOut + 1 ColumnLayout { - spacing: sidebarPadding anchors.fill: parent anchors.margins: sidebarPadding + spacing: sidebarPadding RowLayout { Layout.fillHeight: false @@ -177,6 +177,7 @@ Scope { GameMode {} IdleInhibitor {} CloudflareWarp {} + EasyEffectsToggle {} } // Center widget group diff --git a/.config/quickshell/ii/modules/sidebarRight/quickToggles/CloudflareWarp.qml b/.config/quickshell/ii/modules/sidebarRight/quickToggles/CloudflareWarp.qml index 4e314fb19..39416ab22 100644 --- a/.config/quickshell/ii/modules/sidebarRight/quickToggles/CloudflareWarp.qml +++ b/.config/quickshell/ii/modules/sidebarRight/quickToggles/CloudflareWarp.qml @@ -15,6 +15,7 @@ QuickToggleButton { source: 'cloudflare-dns-symbolic' anchors.centerIn: parent + width: 16 height: 16 colorize: true color: root.toggled ? Appearance.m3colors.m3onPrimary : Appearance.colors.colOnLayer1 diff --git a/.config/quickshell/ii/modules/sidebarRight/quickToggles/EasyEffectsToggle.qml b/.config/quickshell/ii/modules/sidebarRight/quickToggles/EasyEffectsToggle.qml new file mode 100644 index 000000000..0a685463e --- /dev/null +++ b/.config/quickshell/ii/modules/sidebarRight/quickToggles/EasyEffectsToggle.qml @@ -0,0 +1,50 @@ +import qs.modules.common +import qs.modules.common.widgets +import qs +import Quickshell.Io +import Quickshell +import Quickshell.Hyprland + +QuickToggleButton { + id: root + toggled: false + visible: false + buttonIcon: "instant_mix" + + onClicked: { + if (toggled) { + root.toggled = false + Quickshell.execDetached(["pkill", "easyeffects"]) + } else { + root.toggled = true + Quickshell.execDetached(["easyeffects", "--gapplication-service"]) + } + } + + altAction: () => { + Quickshell.execDetached(["easyeffects"]) + Hyprland.dispatch("global quickshell:sidebarRightClose") + } + + Process { + id: fetchAvailability + running: true + command: ["bash", "-c", "command -v easyeffects"] + onExited: (exitCode, exitStatus) => { + root.visible = exitCode === 0 + } + } + + Process { + id: fetchActiveState + running: true + command: ["pidof", "easyeffects"] + onExited: (exitCode, exitStatus) => { + root.toggled = exitCode === 0 + } + } + + StyledToolTip { + content: Translation.tr("EasyEffects | Right-click to configure") + } +} diff --git a/.config/quickshell/ii/modules/sidebarRight/quickToggles/IdleInhibitor.qml b/.config/quickshell/ii/modules/sidebarRight/quickToggles/IdleInhibitor.qml index aa1e292e9..949842d4b 100644 --- a/.config/quickshell/ii/modules/sidebarRight/quickToggles/IdleInhibitor.qml +++ b/.config/quickshell/ii/modules/sidebarRight/quickToggles/IdleInhibitor.qml @@ -20,7 +20,7 @@ QuickToggleButton { Process { id: fetchActiveState running: true - command: ["bash", "-c", "pidof wayland-idle-inhibitor.py"] + command: ["pidof", "wayland-idle-inhibitor.py"] onExited: (exitCode, exitStatus) => { root.toggled = exitCode === 0 } diff --git a/.config/quickshell/ii/modules/sidebarRight/quickToggles/QuickToggleButton.qml b/.config/quickshell/ii/modules/sidebarRight/quickToggles/QuickToggleButton.qml index c42a05d5a..25a53de1a 100644 --- a/.config/quickshell/ii/modules/sidebarRight/quickToggles/QuickToggleButton.qml +++ b/.config/quickshell/ii/modules/sidebarRight/quickToggles/QuickToggleButton.qml @@ -5,7 +5,7 @@ import QtQuick GroupButton { id: button property string buttonIcon - baseWidth: altAction ? 60 : 40 + baseWidth: 40 baseHeight: 40 clickedWidth: baseWidth + 20 toggled: false @@ -14,7 +14,7 @@ GroupButton { contentItem: MaterialSymbol { anchors.centerIn: parent - iconSize: Appearance.font.pixelSize.larger + iconSize: 20 fill: toggled ? 1 : 0 color: toggled ? Appearance.m3colors.m3onPrimary : Appearance.colors.colOnLayer1 horizontalAlignment: Text.AlignHCenter