alpha
Login
or
Join now
seanaye.bsky.social
/
nixos-config
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
me like nix
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
brightness ctl
author
Sean Aye
date
1 month ago
(May 10, 2026, 3:37 PM -0400)
commit
1cb150ed
1cb150ed00284f82bfc07aef77b859fdbf46803d
parent
d7b3b48f
d7b3b48f2f432946e82a473706667e6ff5d825c5
change-id
kyylrtvl
kyylrtvlnlknpnqwotrzytpkypqmmsow
+32
-3
1 changed file
Expand all
Collapse all
Unified
Split
modules
_config
quickshell
modules
rightpanel
RightPanel.qml
+32
-3
modules/_config/quickshell/modules/rightpanel/RightPanel.qml
Reviewed
···
164
164
}
165
165
166
166
Item {
167
167
+
id: brightnessSlider
167
168
Layout.fillWidth: true
168
168
-
height: 6
169
169
+
height: 14
169
170
property real animatedPct: Services.Brightness.brightness
170
171
Behavior on animatedPct { Anim { duration: Config.Appearance.anim.durations.large } }
171
171
-
Rectangle { anchors.fill: parent; radius: 3; color: Config.Colours.surface1 }
172
172
+
173
173
+
function setBrightnessFromX(x) {
174
174
+
const pct = Math.max(1, Math.min(100, Math.round(x / width * 100)))
175
175
+
brightnessProc.percent = pct
176
176
+
brightnessProc.running = true
177
177
+
}
178
178
+
172
179
Rectangle {
180
180
+
anchors.verticalCenter: parent.verticalCenter
181
181
+
width: parent.width
182
182
+
height: 6
183
183
+
radius: 3
184
184
+
color: Config.Colours.surface1
185
185
+
}
186
186
+
Rectangle {
187
187
+
anchors.verticalCenter: parent.verticalCenter
173
188
width: parent.width * parent.animatedPct / 100
174
174
-
height: parent.height; radius: 3; color: Config.Colours.yellow
189
189
+
height: 6
190
190
+
radius: 3
191
191
+
color: Config.Colours.yellow
192
192
+
}
193
193
+
MouseArea {
194
194
+
anchors.fill: parent
195
195
+
hoverEnabled: true
196
196
+
cursorShape: Qt.PointingHandCursor
197
197
+
onPressed: mouse => brightnessSlider.setBrightnessFromX(mouse.x)
198
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
368
+
Process {
369
369
+
id: brightnessProc
370
370
+
property int percent: Services.Brightness.brightness
371
371
+
command: ["brightnessctl", "set", percent + "%"]
372
372
+
}
344
373
}