micheleg / dash-to-dock

A dock for the Gnome Shell. This extension moves the dash out of the overview transforming it in a dock for an easier launching of applications and a faster switching between windows and desktops.
https://micheleg.github.io/dash-to-dock/
GNU General Public License v2.0
3.84k stars 463 forks source link

Integration with desktop icons and desktop icons ng #1255

Open rastersoft opened 4 years ago

rastersoft commented 4 years ago

Hello:

As you maybe know, there is a problem with desktop icons and dash-to-dock when it is used with the intelligent hide mode, because since desktop icons can't know that the dock occupies part of the screen, it can add in that zone new icons, which would be always hidden under the dock or under a window. The same happens with DING (Desktop Icons NG).

I'm working in a solution for this, but of course I want to ensure that it is a good solution for all (which includes also dash-to-panel at least). For this, I created a patch for gnome shell that adds a new class where any dynamic element can register "margins" that are used by them, allowing other extensions (like desktop icons) to know which parts of the screen are "safe".

I'm starting a discussion for it in gnome shell. The MR is at https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1314 Can you check it and give your opinion, and what you would change?

Thanks.

3v1n0 commented 4 years ago

Ah, this looks interesting.

I actually had started something similar (I think we had a quick discussion about on IRC long time ago), but indeed that's something I'd like to address.

I was wondering whether this should be just a protocol exposed by the desktop icons extensions though and not by the shell itself, so that other extensions can check if it's present, otherwise ignore it.

As I don't see upstream to be interested in this as desktop is far from being part of the GNOME design, if not going to be dropped at all.

rastersoft commented 4 years ago

The problem with integrating it in the extension is the communication. If the extension adds an object in global (like this patch does), there is the problem that the extensions can be loaded in any order, so it can happen that dash-to-dock is loaded before desktop icons and thus it won't find the object. The same if the user already has dash-to-dock and installs desktop icons from the web page: until a new session is launched, dash-to-dock won't detect it (and also, only if desktop icons is loaded before).

There would be two possible solutions:

The first solution can be done only if the interface is 100% stable, because two extensions that try to install different versions of the object can be problematic (unless we find a way of replacing the object with another and keep the signal connections...).

The second... I see it ugly: using DBus for this looks overkill. And also exposes something that should be private to the window compositor.

What do you think?

rastersoft commented 4 years ago

There seems to be an alternative to move this outside of Gnome. I'll prepare a MR.

3v1n0 commented 4 years ago

There seems to be an alternative to move this outside of Gnome. I'll prepare a MR.

Good... If this could serve as reference, this is what I had done in the past: https://paste.ubuntu.com/p/9qVCcV9PZy/

Maybe you can reuse something or maybe not, it wasn't completed and I also wanted to change few things, but at least the naming sounds better imho :)

rastersoft commented 4 years ago

Good! It has a lot of useful ideas. I'll use some of them. But I will also extract the API part into its own class and file, to allow to reuse it in DING too. It is better to have the same code in both places.

rastersoft commented 4 years ago

Mmm...

        return Meta.Rectangle({
            x: actorBox.x1,
            y: axtorBox.x2,
            width: actorBox.get_width(),
            height: actorBox.get_height()
        });

The y value seems wrong... not only should be actorBox, but also y1, isn't it?

jqadev commented 4 years ago

Hello @3v1n0 and @rastersoft, do you have any updates on this?

Marco, I am curious if you are going to use DING instead of Desktop Icons in Ubuntu 20.10 to finally bring back one of the main desktop features, i.e. Drag & Drop.

I can't believe that you Sergio did so enermous work to create Desktop Icons and DING and you still don't work for Canonical :)

rastersoft commented 4 years ago

These days I've been quite busy with another pet project (controlling my wifi-enabled robotic vacuum cleaner without sending data to Chinese servers), but I hope to end it this weekend and continue with this.

jqadev commented 4 years ago

@rastersoft I am sure that your work toward improving Ubuntu/GNOME Desktop could be sponsored by Canonical. AFAIR guys who take care of Yaru theme were employed by Canonical after some time of developing this Ubuntu community theme. It would give you an opportunity to work on Ubuntu/GNOME Desktop regularly, of course if you want it.

Sorry for the off-topic.

rastersoft commented 4 years ago

Thanks for your trust, but at this moment I prefer to keep it this way.

jqadev commented 3 years ago

@3v1n0 are you going to merge the changes into Ubuntu 20.04? Do you have a plan regarding Desktop Icons NG?