docs: update README with autostart, demo mode, XEmbed tray, window snapping, and Alt+F9 minimize keybinding

This commit is contained in:
2025-12-28 08:26:53 +00:00
parent c927e23f23
commit 3364464b43
53 changed files with 2921 additions and 56 deletions
+12
View File
@@ -72,6 +72,9 @@ void decorations_render_title_bar(Client *client, bool focused)
int text_x = border + BUTTON_PADDING;
int max_width = client->width - 3 * (BUTTON_SIZE + BUTTON_PADDING) - 2 * BUTTON_PADDING;
if (max_width < BUTTON_SIZE) {
return;
}
char display_title[256];
strncpy(display_title, client->title, sizeof(display_title) - 4);
display_title[sizeof(display_title) - 4] = '\0';
@@ -138,6 +141,11 @@ void decorations_render_buttons(Client *client, bool focused)
return;
}
int min_buttons_width = 3 * (BUTTON_SIZE + BUTTON_PADDING) + BUTTON_PADDING;
if (client->width < min_buttons_width) {
return;
}
Display *dpy = dwn->display;
const ColorScheme *colors = config_get_colors();
int title_height = config_get_title_height();
@@ -148,6 +156,10 @@ void decorations_render_buttons(Client *client, bool focused)
int max_x = close_x - BUTTON_SIZE - BUTTON_PADDING;
int min_x = max_x - BUTTON_SIZE - BUTTON_PADDING;
if (close_x < border || max_x < border || min_x < border) {
return;
}
unsigned long bg_color = focused ? colors->title_focused_bg : colors->title_unfocused_bg;
XSetForeground(dpy, dwn->gc, bg_color);