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

Another polybar startup issue #13

Closed g4rrucho closed 4 years ago

g4rrucho commented 4 years ago

Hello mate.

First of all, great project you have here! Been searching for this kind of program for 4 days and find yours!

I have a script that starts my bars with polybar. While running the script from the shell the tray bar hides, with i3 it does not.

i3 config: exec_always --no-startup-id ~/.scripts/polybar.sh

polybar startup script:

#!/bin/bash

# Killall polybar instances
killall -q polybar

# Execute polybar
polybar bar1 &
polybar systray &

# Wait so hideIt script finds the polybar tray window
sleep 5

# If second monitor is connected start bar2 in HDMI monitor
if [ $(xrandr | grep -sw 'connected' | wc -l ) -eq 2 ]
then
    polybar bar2 &
    hideIt -w --name '^Polybar tray window$' --region 0x2160+10+-40
else
    hideIt -w --name '^Polybar tray window$' --region 0x1080+10+-40
fi

I've tried to add the hideIt.sh to my $PATH, and installing the AUR package but with no success. Again it only works if I run the script from the terminal.

OS: arch linux WM: i3 Shell: zsh + oh-my-zsh

Thanks

g4rrucho commented 4 years ago

Found the solution. Didn't see that you have the option -w "wait for the window". Also added the option -H "hover". With these two, it's working now. Sorry for the trouble.