From 893e4ab58fce2918480501f999313000b6de6249 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Wed, 15 Apr 2026 16:35:36 +0200 Subject: Add tiling and floating mode --- glitch.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'glitch.h') diff --git a/glitch.h b/glitch.h index 507b007..b4e416d 100644 --- a/glitch.h +++ b/glitch.h @@ -32,6 +32,11 @@ typedef enum { LOG_ERROR, } LogLevel; +typedef enum { + LAYOUT_FLOATING, + LAYOUT_TILING, +} LayoutMode; + typedef struct { unsigned long normal_active; unsigned long normal_inactive; @@ -77,16 +82,23 @@ typedef struct { XftColor xft_mic_muted_bg; XftColor xft_mic_active_fg; XftColor xft_mic_muted_fg; - + XftColor xft_layout_tile_bg; + XftColor xft_layout_float_bg; + XftColor xft_layout_tile_fg; + XftColor xft_layout_float_fg; + unsigned long last_widget_update; Client *clients; - + int is_cycling; Window cycle_win; Window *cycle_clients; int cycle_count; int active_cycle_index; + // Layout management + LayoutMode layout_modes[NUM_DESKTOPS + 1]; // 1-indexed for convenience + // PulseAudio pa_threaded_mainloop *pa_mainloop; pa_context *pa_ctx; @@ -172,10 +184,14 @@ void center_window(const Arg *arg); void widget_desktop_indicator(void); void widget_datetime(void); void widget_mic_indicator(void); +void widget_layout_indicator(void); void redraw_widgets(void); void init_audio(void); void deinit_audio(void); void toggle_mic_mute(const Arg *arg); +void apply_tiling_layout(void); +void toggle_layout(const Arg *arg); + #endif // GLITCH_H -- cgit v1.2.3