Package: tint2 Version: 17.0.1-1.2 Severity: wishlist Tags: patch Dear Maintainer,
Attached is a patch to add hide_iconified_tasks which behaves like hide_inactive_tasks but for iconified windows. I use fvwm and its IconBox to handle iconified windows and having them in the taskbar is kinda redundant for me. -- System Information: Debian Release: trixie/sid APT prefers stable-security APT policy: (999, 'stable-security'), (990, 'testing'), (970, 'unstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.12.25-00001-g74c2bc538b29 (SMP w/8 CPU threads; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages tint2 depends on: ii libc6 2.41-7 ii libcairo2 1.18.4-1+b1 ii libgdk-pixbuf-2.0-0 2.42.12+dfsg-2 ii libglib2.0-0t64 2.84.1-2 ii libgtk-3-0t64 3.24.49-3 ii libimlib2t64 1.12.4-2 ii libpango-1.0-0 1.56.3-1 ii libpangocairo-1.0-0 1.56.3-1 ii librsvg2-2 2.60.0+dfsg-1 ii libstartup-notification0 0.12-8 ii libx11-6 2:1.8.12-1 ii libxcomposite1 1:0.4.6-1 ii libxdamage1 1:1.1.6-1+b2 ii libxext6 2:1.3.4-1+b3 ii libxinerama1 2:1.1.4-3+b4 ii libxrandr2 2:1.5.4-1+b3 ii libxrender1 1:0.9.12-1 tint2 recommends no packages. tint2 suggests no packages. -- no debconf information
diff -ruN tint2-v17.0.1.orig/src/config.c tint2-v17.0.1/src/config.c --- tint2-v17.0.1.orig/src/config.c 2021-05-29 02:24:56.000000000 -0700 +++ tint2-v17.0.1/src/config.c 2025-05-10 20:59:21.193057543 -0700 @@ -1008,6 +1008,8 @@ taskbarname_active_font.alpha = 0.5; } else if (strcmp(key, "taskbar_hide_inactive_tasks") == 0) { hide_inactive_tasks = atoi(value); + } else if (strcmp(key, "taskbar_hide_iconified_tasks") == 0) { + hide_iconified_tasks = atoi(value); } else if (strcmp(key, "taskbar_hide_different_monitor") == 0) { hide_task_diff_monitor = atoi(value); } else if (strcmp(key, "taskbar_hide_different_desktop") == 0) { diff -ruN tint2-v17.0.1.orig/src/taskbar/taskbar.c tint2-v17.0.1/src/taskbar/taskbar.c --- tint2-v17.0.1.orig/src/taskbar/taskbar.c 2021-05-29 02:24:56.000000000 -0700 +++ tint2-v17.0.1/src/taskbar/taskbar.c 2025-05-10 21:00:05.506294467 -0700 @@ -42,6 +42,7 @@ gboolean taskbar_distribute_size; gboolean hide_task_diff_desktop; gboolean hide_inactive_tasks; +gboolean hide_iconified_tasks; gboolean hide_task_diff_monitor; gboolean hide_taskbar_if_empty; gboolean always_show_all_desktop_tasks; @@ -85,6 +86,7 @@ taskbar_distribute_size = FALSE; hide_task_diff_desktop = FALSE; hide_inactive_tasks = FALSE; + hide_iconified_tasks = FALSE; hide_task_diff_monitor = FALSE; hide_taskbar_if_empty = FALSE; always_show_all_desktop_tasks = FALSE; diff -ruN tint2-v17.0.1.orig/src/taskbar/taskbar.h tint2-v17.0.1/src/taskbar/taskbar.h --- tint2-v17.0.1.orig/src/taskbar/taskbar.h 2021-05-29 02:24:56.000000000 -0700 +++ tint2-v17.0.1/src/taskbar/taskbar.h 2025-05-10 21:02:44.569965784 -0700 @@ -58,6 +58,7 @@ extern gboolean taskbar_distribute_size; extern gboolean hide_task_diff_desktop; extern gboolean hide_inactive_tasks; +extern gboolean hide_iconified_tasks; extern gboolean hide_task_diff_monitor; extern gboolean hide_taskbar_if_empty; extern gboolean always_show_all_desktop_tasks; diff -ruN tint2-v17.0.1.orig/src/taskbar/task.c tint2-v17.0.1/src/taskbar/task.c --- tint2-v17.0.1.orig/src/taskbar/task.c 2021-05-29 02:24:56.000000000 -0700 +++ tint2-v17.0.1/src/taskbar/task.c 2025-05-10 20:58:09.047927993 -0700 @@ -755,6 +755,11 @@ hide = TRUE; } } + if (hide_iconified_tasks) { + if (state == TASK_ICONIFIED) { + hide = TRUE; + } + } if (hide_task_diff_desktop) { if (taskbar->desktop != server.desktop) hide = TRUE; diff -ruN tint2-v17.0.1.orig/src/tint2conf/properties.c tint2-v17.0.1/src/tint2conf/properties.c --- tint2-v17.0.1.orig/src/tint2conf/properties.c 2021-05-29 02:24:56.000000000 -0700 +++ tint2-v17.0.1/src/tint2conf/properties.c 2025-05-10 21:06:57.469903634 -0700 @@ -46,7 +46,7 @@ // taskbar GtkWidget *taskbar_show_desktop, *taskbar_show_name, *taskbar_padding_x, *taskbar_padding_y, *taskbar_spacing; -GtkWidget *taskbar_hide_inactive_tasks, *taskbar_hide_diff_monitor, *taskbar_hide_diff_desktop; +GtkWidget *taskbar_hide_inactive_tasks, *taskbar_hide_iconified_tasks, *taskbar_hide_diff_monitor, *taskbar_hide_diff_desktop; GtkWidget *taskbar_name_padding_x, *taskbar_name_padding_y, *taskbar_name_inactive_color, *taskbar_name_active_color; GtkWidget *taskbar_name_font, *taskbar_name_font_set; GtkWidget *taskbar_active_background, *taskbar_inactive_background; @@ -2636,6 +2636,23 @@ NULL); col = 2; + row++; + label = gtk_label_new(_("Hide iconified tasks")); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0); + gtk_widget_show(label); + gtk_table_attach(GTK_TABLE(table), label, col, col + 1, row, row + 1, GTK_FILL, 0, 0, 0); + col++; + + taskbar_hide_iconified_tasks = gtk_check_button_new(); + gtk_widget_show(taskbar_hide_iconified_tasks); + gtk_table_attach(GTK_TABLE(table), taskbar_hide_iconified_tasks, col, col + 1, row, row + 1, GTK_FILL, 0, 0, 0); + col++; + gtk_tooltips_set_tip(tooltips, + taskbar_hide_iconified_tasks, + _("If enabled, hide iconified tasks from the taskbar."), + NULL); + + col = 2; row++; label = gtk_label_new(_("Hide tasks from different monitors")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0); diff -ruN tint2-v17.0.1.orig/src/tint2conf/properties.h tint2-v17.0.1/src/tint2conf/properties.h --- tint2-v17.0.1.orig/src/tint2conf/properties.h 2021-05-29 02:24:56.000000000 -0700 +++ tint2-v17.0.1/src/tint2conf/properties.h 2025-05-10 21:03:26.155311227 -0700 @@ -50,7 +50,7 @@ // taskbar extern GtkWidget *taskbar_show_desktop, *taskbar_show_name, *taskbar_padding_x, *taskbar_padding_y, *taskbar_spacing; -extern GtkWidget *taskbar_hide_inactive_tasks, *taskbar_hide_diff_monitor, *taskbar_hide_diff_desktop; +extern GtkWidget *taskbar_hide_inactive_tasks, *taskbar_hide_iconified_tasks, *taskbar_hide_diff_monitor, *taskbar_hide_diff_desktop; extern GtkWidget *taskbar_name_padding_x, *taskbar_name_padding_y, *taskbar_name_inactive_color, *taskbar_name_active_color; extern GtkWidget *taskbar_name_font, *taskbar_name_font_set;