FelixKratz / SketchyBar

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

Item alias scaling the image #361

Closed zcag closed 1 year ago

zcag commented 1 year ago

Is there a way to scale the image for the alias?

I'm trying to make this alias align better and have similar sizes to my other items: image

Not sure if I'm missing anything but I checked the documentation and existing issues but only reference i found was this: https://github.com/FelixKratz/SketchyBar/issues/53#issuecomment-926426842

I tries setting the background images of the item, label and icon but didn't work, not sure where this image lives. sketchybar --set 'Control Center,Battery' background.image.scale=50 icon.background.image.scale=50 label.background.image.scale=50

I'm using my 14" M1 Macbook pro with 3024x1964 resolution, so my original menu bar is smaller than usual, probably that's why it looks so weird with the default size.

FelixKratz commented 1 year ago

I think there is no way to scale the alias image currently, but it should be no problem to expose the scale property for an alias, as it internally is the same as a regular image.

https://github.com/FelixKratz/SketchyBar/blob/a8012ff3d91ed0877d89b2d175833b5d375c565e/src/alias.h#L23

FelixKratz commented 1 year ago

With the latest commit you can scale aliases just like regular images:

sketchybar --set <name> alias.scale=<float>
zcag commented 1 year ago

It works, thanks!