unixorn / lima-xbar-plugin

xbar/Swiftbar plugin to control lima-vm
Apache License 2.0
117 stars 12 forks source link

Get a better icon for the menubar #22

Open unixorn opened 3 years ago

unixorn commented 3 years ago

This could use a proper icon for the menubar.

pattimcletchie commented 3 years ago

@unixorn can you assign this to me? I would like to try and tackle the issue for you.

unixorn commented 3 years ago

Done! Thanks for volunteering.

There are specs for the image at https://github.com/matryer/xbar-plugins/blob/main/CONTRIBUTING.md, I'd like something suitable for use with the image= tag.

It's going to have to fit in the menubar, so it can't be too complicated an image.

pattimcletchie commented 3 years ago

@unixorn thank you for the specs. I plan on working on this tonight (US, central timezone). If I run into any questions I will ping you.

I look forward to contributing.

unixorn commented 3 years ago

Sounds great. Maybe have a red and a green version of the image so I can colorize the menubar icon based on whether there are any running Lima VMs.

Perhaps something inspired by the containerd icon? https://containerd.io/

exculibar commented 7 months ago

Since lima-plugin itself is a python script, we can easily modify its icons.

When you use Swiftbar, you can use sfimage= to set a SF Symbol as the icon. For example, replace menuBarIcon = f"🐋 🏃 | color={RUNNING_VM_COLOR}" with menuBarIcon = f"| sfimage=externaldrive.fill.badge.checkmark".

When using Xbar, use image= to set the base64 value of the custom icon

Attached here is the effect after I modified it 41713680596_ pic 51713680640_ pic

unixorn commented 7 months ago

That looks great - please put in a PR, I'd love to add that to the plugin