me like nix
0

Configure Feed

Select the types of activity you want to include in your feed.

brightness ctl

author
Sean Aye
date (May 10, 2026, 3:37 PM -0400) commit 1cb150ed parent d7b3b48f change-id kyylrtvl
+32 -3
+32 -3
modules/_config/quickshell/modules/rightpanel/RightPanel.qml
··· 164 164 } 165 165 166 166 Item { 167 + id: brightnessSlider 167 168 Layout.fillWidth: true 168 - height: 6 169 + height: 14 169 170 property real animatedPct: Services.Brightness.brightness 170 171 Behavior on animatedPct { Anim { duration: Config.Appearance.anim.durations.large } } 171 - Rectangle { anchors.fill: parent; radius: 3; color: Config.Colours.surface1 } 172 + 173 + function setBrightnessFromX(x) { 174 + const pct = Math.max(1, Math.min(100, Math.round(x / width * 100))) 175 + brightnessProc.percent = pct 176 + brightnessProc.running = true 177 + } 178 + 172 179 Rectangle { 180 + anchors.verticalCenter: parent.verticalCenter 181 + width: parent.width 182 + height: 6 183 + radius: 3 184 + color: Config.Colours.surface1 185 + } 186 + Rectangle { 187 + anchors.verticalCenter: parent.verticalCenter 173 188 width: parent.width * parent.animatedPct / 100 174 - height: parent.height; radius: 3; color: Config.Colours.yellow 189 + height: 6 190 + radius: 3 191 + color: Config.Colours.yellow 192 + } 193 + MouseArea { 194 + anchors.fill: parent 195 + hoverEnabled: true 196 + cursorShape: Qt.PointingHandCursor 197 + onPressed: mouse => brightnessSlider.setBrightnessFromX(mouse.x) 198 + onPositionChanged: mouse => { if (pressed) brightnessSlider.setBrightnessFromX(mouse.x) } 175 199 } 176 200 } 177 201 } ··· 341 365 342 366 // Volume/brightness control processes 343 367 Process { id: muteProc; command: ["wpctl", "set-mute", "@DEFAULT_AUDIO_SINK@", "toggle"] } 368 + Process { 369 + id: brightnessProc 370 + property int percent: Services.Brightness.brightness 371 + command: ["brightnessctl", "set", percent + "%"] 372 + } 344 373 }