all repos — tint2 @ 1fc417e24ef92de5319fab079a2fa94abf76f489

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

Merge branch 'master' into 'master'

Add systray_hide_by_icon_name Exact Match, Deliminator ','

See merge request !24
o9000 mrovi9000@gmail.com
commit

1fc417e24ef92de5319fab079a2fa94abf76f489

parent

2e49b66ac2385943fdd68592da7825d93b630e6e

3 files changed, 20 insertions(+), 1 deletions(-)

jump to
M src/config.csrc/config.c

@@ -1009,6 +1009,8 @@ systray.saturation = atoi(value2);

systray.brightness = atoi(value3); } else if (strcmp(key, "systray_monitor") == 0) { systray_monitor = atoi(value) - 1; + } else if (strcmp(key, "systray_hide_by_icon_name") == 0) { + strcpy(systray_hide_icons, value); } /* Launcher */
M src/systray/systraybar.csrc/systray/systraybar.c

@@ -54,6 +54,7 @@ int systray_monitor;

int chrono; int systray_composited; int systray_profile; +char systray_hide_icons[100]; // background pixmap if we render ourselves the icons static Pixmap render_background;

@@ -583,6 +584,22 @@ return FALSE;

} } + char *name = get_window_name(win); + + // Filter out systray_hide_by_icon_name + char *token; + char *string; + string = strdup(systray_hide_icons); + if (string != NULL && string[0] != '0') { + while ((token = strsep(&string, ",")) != NULL) { + if (strcmp(token,name) == 0) { + if (strcmp(token,"") == 0) token = "empty name"; + fprintf(stderr, GREEN "filtering out '%s'\n", token); + return FALSE; + } + } + } + // Dangerous actions begin XSync(server.display, False); error = FALSE;

@@ -590,7 +607,6 @@ XErrorHandler old = XSetErrorHandler(window_error_handler);

XSelectInput(server.display, win, StructureNotifyMask | PropertyChangeMask | ResizeRedirectMask); - char *name = get_window_name(win); if (systray_profile) fprintf(stderr, "[%f] %s:%d win = %lu (%s)\n", profiling_get_time(), __FUNCTION__, __LINE__, win, name); Panel *panel = systray.area.panel;
M src/systray/systraybar.hsrc/systray/systraybar.h

@@ -75,6 +75,7 @@ extern gboolean systray_enabled;

extern int systray_max_icon_size; extern int systray_monitor; extern gboolean systray_profile; +extern char systray_hide_icons[100]; // default global data void default_systray();