how to make automatic disappearing titlebars

how can i make it so that the titlebar will only show up when my mouse is on the portion of the screen where the titlebar is?

something like this <- the timing isnt so good cuz i used a keyboard shortcut to fake it, but i hope u get the gist of what i want to accomplish

Not sure if you can. You could have it trigger when mouse leaves window from the north border, but is not exactly what you want.

The problem is that you need a triggering event for it. Moving mouse over the headerbar does not trigger event. So, without the triggering event, you would have to poll for mouse location 2-4 times per second to make it feel responsive, and that uses a lot of unnecessary cpu cycles.

But, in case it helps, the thing you want to check is if y co-ordinate of mouse location is less than y co-ordinate focused window + 30 or so.

So something like

#/bin/dash
eval $(xdotool getmouselocation --shell)
target=(($(wattr y $(pfw)) + 30)) 

if [ $Y -lt $target ];
then
     if ! $menu_visible;
     then
           show_menu
     fi
else
     if $menu_visible;
     then
           hide_menu
     fi
fi

hope that helps

3 Likes

Forum kindly sponsored by Bytemark