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

Polybar does not hide on initial startup (i3) #11

Closed anonymous133 closed 4 years ago

anonymous133 commented 4 years ago

Hi,

I've read through all issues and tried the mentioned solutions but to no avail.

I'm running i3 gaps but the bar does not hide after boot. Only when I go over it with the mouse it will go away afterwards. When I use the commands via terminal it works.

Here is my polybar config: https://pastebin.com/u6rVMQYw

I have a bash script to start all applications. I start polybar and hideit.sh like this:

/usr/bin/polybar bar & disown /usr/bin/hideIt.sh -w -C 'Polybar' --region 0x1440+3440+-80 -d bottom -i 0.1 & disown

Can you see what I'm doing wrong?

Thank you very much!

tadly commented 4 years ago

Hm... I just tried replicating it but using your startup-script everything is working just fine.

Can you go into a bit more detail on what scenario doesn't and what does work (to rule out misunderstandings on my end)?

p.s. is there a reason you use --region instead of --hover? region has to do polling so you should prefer hover if at all possible :)

anonymous133 commented 4 years ago

Hi and thank you for helping :)

is there a reason you use --region instead of --hover? I tried to switch to Hover but when I do that I get the transition animation playing over and over again. I figured out that it is because of offset-y = 16 in my polybar config. I use a transparent bar and have the bar floating further away from the bottom end of the screen.

To answer your questions:

This is the log right after the login when the bar is visible and did not hide itself:

Searching window... Waiting for window.. Found window with id: 16777218 Fetching window dimensions... Fetching screen dimensions... Initially hiding window... Defined region: X: 0 3440 Y: 1360 1440

Waiting for region...

The log file has the same content after I went over the bar with the mouse and then its working as expected. Only initially the bar does not get hidden.

Thank you very much :)

tadly commented 4 years ago

Hm... Where do you start your script? From your i3 config I assume? Mind putting a sleep 1 at the top of the script (just to make sure i3 fully initialized)? Doubt this is the problem but I honestly don't know what could cause such an issue so we have to fiddle around with it

anonymous133 commented 4 years ago

Amazing.. You were right!

sleep 1 fixed the problem!

Thank you very much!

tadly commented 4 years ago

No problem. Glad we could find a solution :)