FelixKratz / SketchyBar

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

[Bug] sketchybar alias items disappears when macos menubar is set to transparent with yabai. #558

Closed aspauldingcode closed 1 month ago

aspauldingcode commented 1 month ago

when I run yabai -m config menubar_opacity 0.0 to disable menubar mouse events, all sketchybar menubar alias items disappear.

if we set the alias item colors, it shouldn't change. in addition, if I use a different float value, it impacts the sketchybar alias items. This should not impact sketchybar either.

aspauldingcode commented 1 month ago

Fixed manually by disabling update_freq before hiding menubar, after updating sketchybar.

sketchybar --update

# Fetch the menu items from sketchybar query
sleep 4
/opt/homebrew/bin/sketchybar --query default_menu_items | /run/current-system/sw/bin/jq -r '.[]' | while IFS= read -r item; do /opt/homebrew/bin/sketchybar --set "$item" alias.update_freq=0; done && sleep 3
/opt/homebrew/bin/yabai -m config menubar_opacity 0.0

Think the updating of the alias (for the clock for example) causes it to disappear because it also reads in alpha color values..?

FelixKratz commented 1 month ago

Thats to be expected, because we use a screen capture of the actual menu bar item to display the alias.