summaryrefslogtreecommitdiff
path: root/glitch.h
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2026-01-25 15:45:26 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2026-01-25 15:45:26 +0100
commitf3dcaa18f2c97d39963df8414c80c4689c2882c4 (patch)
tree51d60b4692c2b712ac848e16a97fc67e3a177733 /glitch.h
parent12aa9ddc7337161c3e6ed18414787789a9c8dc22 (diff)
downloadglitch-f3dcaa18f2c97d39963df8414c80c4689c2882c4.tar.gz
Add microphone status indicator
Diffstat (limited to 'glitch.h')
-rw-r--r--glitch.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/glitch.h b/glitch.h
index d8b9166..507b007 100644
--- a/glitch.h
+++ b/glitch.h
@@ -8,8 +8,11 @@
#include <X11/keysym.h>
#include <X11/XF86keysym.h>
#include <X11/Xft/Xft.h>
+#include <pulse/pulseaudio.h>
+#ifndef MAX
#define MAX(a, b) ((a) > (b) ? (a) : (b))
+#endif
#define LENGTH(x) (sizeof(x) / sizeof((x)[0]))
#define NUM_DESKTOPS 9
@@ -70,6 +73,10 @@ typedef struct {
XftColor xft_bg_color;
XftColor xft_root_bg_color;
XftColor xft_widget_color;
+ XftColor xft_mic_active_bg;
+ XftColor xft_mic_muted_bg;
+ XftColor xft_mic_active_fg;
+ XftColor xft_mic_muted_fg;
unsigned long last_widget_update;
Client *clients;
@@ -79,6 +86,11 @@ typedef struct {
Window *cycle_clients;
int cycle_count;
int active_cycle_index;
+
+ // PulseAudio
+ pa_threaded_mainloop *pa_mainloop;
+ pa_context *pa_ctx;
+ int mic_muted;
} WindowManager;
typedef struct {
@@ -159,6 +171,11 @@ void center_window(const Arg *arg);
void widget_desktop_indicator(void);
void widget_datetime(void);
+void widget_mic_indicator(void);
void redraw_widgets(void);
+void init_audio(void);
+void deinit_audio(void);
+void toggle_mic_mute(const Arg *arg);
+
#endif // GLITCH_H