add volume and brightness control

This commit is contained in:
2026-08-18 12:36:52 +02:00
parent 1d59b7808b
commit 7ff0f584e0
14 changed files with 984 additions and 2 deletions
+47
View File
@@ -1,5 +1,6 @@
import Quickshell
import Quickshell.Io
import qs.config
import qs.modules
import qs.services
@@ -84,6 +85,52 @@ ShellRoot {
}
}
IpcHandler {
target: "controls"
function toggle(): void {
Session.toggle("controls", "");
}
function open(): void {
Session.open("controls", "");
}
function close(): void {
Session.close();
}
}
// Not a menu: these are for the volume and brightness keys, which want to
// move the level without putting anything on screen.
IpcHandler {
target: "volume"
function up(): void {
Audio.step(Config.volumeStep);
}
function down(): void {
Audio.step(-Config.volumeStep);
}
function mute(): void {
Audio.toggleMute();
}
}
IpcHandler {
target: "brightness"
function up(): void {
Brightness.step(Config.brightnessStep);
}
function down(): void {
Brightness.step(-Config.brightnessStep);
}
}
IpcHandler {
target: "bluetooth"