add volume and brightness control
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user