状态栏添加音量显示并添加音量调节功能

This commit is contained in:
2026-02-11 02:22:49 +08:00
parent 194c2b000d
commit a69f3bbc64
9 changed files with 246 additions and 2 deletions

View File

@@ -3,6 +3,7 @@
#include <glib.h>
#include <string.h>
#include "audio.h"
#include "client.h"
#include "monitor.h"
#include "types.h"
@@ -76,6 +77,16 @@ void raise_or_run(const user_action_arg_t *arg) {
spawn(&arguments);
}
void toggle_mute(const user_action_arg_t *arg) {
if (wm.status->pulse_context) toggle_pulse_mute(wm.status->pulse_context);
}
void change_volume(const user_action_arg_t *arg) {
if (wm.status->pulse_context) {
change_pulse_volume(wm.status->pulse_context, arg->i);
}
}
void toggle_client_floating(const user_action_arg_t *arg) {
if (!wm.client_focused) return;