home-sweet-gnome / dash-to-panel

An icon taskbar for the Gnome Shell. This extension moves the dash into the gnome main panel so that the application launchers and system tray are combined into a single panel, similar to that found in KDE Plasma and Windows 7+. A separate dock is no longer needed for easy access to running and favorited applications.
GNU General Public License v2.0
3.79k stars 277 forks source link

[Feature request] minimised apps running indicator style #1751

Open ncka1 opened 2 years ago

ncka1 commented 2 years ago

Set a different 'running indicator style' for minimised apps

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

ybda commented 8 months ago

Maybe someone knows at least how to just do not show indicator when window is minimized? I can't figure out how to check whether window is minimized? I guess this functionality should be put into appIcons.js, we should add _isMinimizedWindow() function. I found similar thing in another repo but I don't know how to integrate it properly: https://github.com/ybda/workspaces-by-open-apps/blob/6517af31234963bc5586fbc82a9f326e2f82073c/src/extension.js#L316 In appIcons.js function _displayProperIndicator we might put check - if window is minimized, remove indicator.

toupeira commented 7 months ago

@ybda minimized state can be checked with this.window.minimized. I use ungrouped apps, so this change works for me to remove the indicator on minimized windows:

diff --git i/appIcons.js w/appIcons.js
index 00352fd..c2039b9 100644
--- i/appIcons.js
+++ w/appIcons.js
@@ -693,7 +693,7 @@ export const TaskbarAppIcon = GObject.registerClass({
         this._setIconStyle(isFocused);

         if(!this._isGroupApps) {
-            if (this.window && (SETTINGS.get_boolean('group-apps-underline-unfocused') || isFocused)) {
+            if (this.window && !this.window.minimized && (SETTINGS.get_boolean('group-apps-underline-unfocused') || isFocused)) {
                 let align = Clutter.ActorAlign[position == DOT_POSITION.TOP || position == DOT_POSITION.LEFT ? 'START' : 'END'];

                 this._focusedDots.set_size(0, 0);

I couldn't get the grouped apps working, I tried setting the opacity to zero like this:

diff --git i/appIcons.js w/appIcons.js
index 00352fd..e5fb590 100644
--- i/appIcons.js
+++ w/appIcons.js
@@ -737,6 +737,11 @@ export const TaskbarAppIcon = GObject.registerClass({
                 newUnfocusedDotsSize = this._containerSize;
                 newUnfocusedDotsOpacity = (!isFocused && this._nWindows > 0) ? 255 : 0;
             }
+
+            if (this.window.minimized) {
+                newFocusedDotsOpacity = 0;
+                newUnfocusedDotsOpacity = 0;
+            }

             // Only animate if...
             // animation is enabled in settings

...but that doesn't seem to get applied. Also not sure if this would really work well, since you can't tell the difference between minimized apps and apps that aren't running at all?

Anyway, while digging through the code I realized there's a setting Font color of the minimized application titles for ungrouped apps, so I just set that to a gray color and will use that for now :grinning:

ybda commented 7 months ago

@toupeira I really haven't noticed the Font color of the minimized application titles option, I now use it happily and it works for me. But I think that having an option to set a different indicator color for minimized applications would still be nice. I use ungrouped apps as well, so your solution works for me. And yes, if we remove indicator for minimized windows, it becomes hard to tell whether it's minimized or not running at all (I really just didn't think of it). Many thanks for your collaboration!

toupeira commented 7 months ago

@ybda you're very welcome! :grinning:

Maybe reducing the opacity of the whole button (icon + indicator + title) would work well in all cases, but I'm not sure how to achieve that.

stale[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.