fthx / dock-from-dash

GNU General Public License v3.0
96 stars 20 forks source link

intellihide #4

Closed jumpers775 closed 2 years ago

jumpers775 commented 2 years ago

hey, so opening the dock inst hard, but the mouse has to be all the way at the bottom. if it is possible to make it so that when no apps are in the way you dont have to move the mouse all the way to the bottom, and have it there for as long that would be great!

fthx commented 2 years ago

You want intellihide?

jumpers775 commented 2 years ago

yes, that is one of the most useful things about dash to dock imo. ofc, this beats dash to dock because this uses the actual dash. I will look into making this myself, and i will submit a pr if i can get something like that to work.

jumpers775 commented 2 years ago

so, im looking into this, do you know where i can find any documentation for imports.ui.main(line 11)? it seems like that would likely include what i would need to implement checks for if there is a window behind the dock. (im not looking to add intellihide, looked at the code for that and there's more there than i want to do. im just making it possible to show even when the mouse isnt there and go away when a window blocks it as well as come back when that window is gone)

fthx commented 2 years ago

You have to crawl here: https://gitlab.gnome.org/GNOME/gnome-shell/-/tree/main/js/ui

But you will need: https://gjs-docs.gnome.org too.

Intellihide is what you are wishing. That's some work and this extension has to stay reliable and short. But if you find a GS-native way to do that, you're welcome.

jumpers775 commented 2 years ago

hey so looking into the first link i keep seeing windows[i] called throughout the different files, but i cannot for the life of me find where its defined. do you happen to know this? i currently just need to introduce checks, i have all of the objects defined except the dash, but that shouldnt be too hard.

fthx commented 2 years ago

TBH intellihide is a quite complicated feature. You have to watch for windows (moved, created, closed...) for the current workspace.

If you find an elegant way to implement that, I'll be happy with. But...

jumpers775 commented 2 years ago

well what i currently have is just constantly searching for the top window, i just need to add a check if it overlaps and its done. it could also be adapted to iterate over the top 2 or 3 to not have situations where its in the way. the issue here becomes i am not to familiar with this library so following the sources and looking at how the rest is built i can get to a point where i have a window object and it has windows[i].x and windows[i].y, however i am unable to find where windows is defined so cant see what result those should be outputing and hence how to check if it overlaps. once i can get that implementing checks should be trivial and then i just cal the function before it hides.

jumpers775 commented 2 years ago

i have switched away from linux do to some incompatabilities with required software for remote work and will no longer be working on this.