tadly / hideIt.sh

Automagically hide/show a window by its name when the cursor is within a defined region or you mouse over it.
GNU General Public License v3.0
248 stars 11 forks source link

Not hiding tray #16

Open f3bruary opened 3 years ago

f3bruary commented 3 years ago

I set up hideit to hide my polybar to the bottom, and it's working but the tray doesn't move with the bar. It stays stuck onscreen.

Screencast 2020-10-09 21:11:43

AWOLASAP commented 3 years ago

Just found this script and messing around with it. Don't know exactly why, but from what I found it only manages one window, and those count as two windows. Let me know if you get this sorted because I'm trying to find a workaround. Maybe run two different instances with IDs?

tadly commented 3 years ago

Dammit, totally forgot about this issue. Sorry.

So yeah. The tray is a separate window and hidIt only manages one at any given time. hideIt also does not know if a window contains a tray and figuring this out (if at all possible) would add a lot of boilerplate code which I'm not fond of adding.

This is why I used to have two separate polybars, one for the systray and one for the main bar as shown in the readme. In regards to the systray it gets even worse. Every element inside the tray is its own window too which is why you can't use --hover as explained in the Q&A

The only workaround I can think of right now is to run hideIt twice, both using --region with the same region defined so the activate the same. Because the windows would not move in sync, this would probably look horrendous though ':D

marrrrko commented 2 years ago

Two commands are definitely needed. It works ok when I put the tray to the left (but not to the right for some reason). Sometimes they appear/disappear slightly out of sync which is indeed a little bit horrendous.

hideIt.sh --wait --name '^polybar-markbar_DP-1$' -d bottom --region 0x2160+3820+-60
hideIt.sh --wait --name '^Polybar tray window$' -d bottom --region 0x2160+3820+-60

bar