FelixKratz / SketchyBar

A highly customizable macOS status bar replacement
https://felixkratz.github.io/SketchyBar/
GNU General Public License v3.0
6.23k stars 94 forks source link

Can sketchybar be hidden in expose? #304

Closed bashu closed 1 year ago

bashu commented 1 year ago

Can sketchybar be hidden in an expose?

Same question for fullscreen videos on youtube, I placed the bar at the bottom and it hides media player's control.

FelixKratz commented 1 year ago

sketchybar can be hidden with the command:

sketchybar --bar hidden=on

I use Safari and have no problems with fullscreen videos. I think I have explicitly checked for native fullscreen spaces and they are ignored by sketchybar: https://github.com/FelixKratz/SketchyBar/blob/1e4725e1a91ecb9d5f2c6cfcfca747719c6df17e/src/bar_manager.c#L786

Hiding sketchybar by default in expose could be done, I believe it would require accessibility permissions though. I am trying to not require any additional permissions by default, i.e. screen capture access is only needed when actually using aliases.

The relevant AX keys for this are:

AXExposeShowAllWindows
AXExposeShowDesktop
AXExposeShowFrontWindows
AXExposeExit

If you are using yabai this is easily scriptable, as yabai has those permissions and even emits an event for it:

yabai -m signal --add event=mission_control_enter action="sketchybar --bar hidden=on"
yabai -m signal --add event=mission_control_exit action="sketchybar --bar hidden=off"
bashu commented 1 year ago

I use Safari and have no problems with fullscreen videos

Yes, I can confirm that it works in safari, but in firefox "full screen" mode on youtube give me this:

Screenshot 2022-12-18 at 10 53 46 PM

bashu commented 1 year ago

Google Chrome also works, so it's only FF

bashu commented 1 year ago

I use Safari and have no problems with fullscreen videos.

It only happens if I switch video in fullscreen mode, while FF window itself is in its normal (not in native fullscreen mode) mode. But if change window by entering native mac os fullscreen mode, everything is fine, sketchbar will be hidden even if media player in its normal (not fullscreen) mode.

FelixKratz commented 1 year ago

It only happens if sketchybar is in topmost mode.

Disable sketchybar as topmost:

sketchybar --bar topmost=off
bashu commented 1 year ago

It only happens if sketchybar is in topmost mode.

Yes, it was topmoste mode

FelixKratz commented 1 year ago

I have found a window tag bit that I can set to hide sketchybar in expose via the WindowServer, on current master the bar will disappear and reappear when entering/exiting expose.