Jean-Tinland / simple-bar

A yabai status bar widget for Übersicht
https://www.jeantinland.com/toolbox/simple-bar
MIT License
1.21k stars 129 forks source link

Add side icon #415

Closed haxybaxy closed 3 months ago

haxybaxy commented 3 months ago

Description

Hello guys, this is one of my first contributions to open source so please be nice ;-; I've been trying to make my macbook look as nice as possible and I have fallen in love with simplebar. I cant help but look at other people's sketchybar configs (like the ones below) and I think having an option to have an icon next to the spaces section on simplebar would be really nice.

CleanShot 2024-08-04 at 21 57 12@2x CleanShot 2024-08-04 at 21 59 47@2x CleanShot 2024-08-04 at 22 00 41@2x

I have managed to add the icon to the left of my spaces section here: CleanShot 2024-08-04 at 22 05 34@2x But I am having trouble adding an option to toggle this in the settings. I think having a section in the settings where you can just define an svg yourself like you can do with the custom styles would be really nice too. I hope we we can collaborate on this <3

Type of change

I have used simplebar with the icon for more than 2 weeks and have yet to run into any issues regarding functionality.

How Has This Been Added?

I have added two files:

System Settings

Jean-Tinland commented 3 months ago

Hi! First, thank you for this pull request, and welcome to the open source world!

I'd be glad to implement this decoration with its associated setting; this is a nice to have feature! I think I'll make the icon hard-coded at first, then we can think about the personalization options.

I'll work on that as soon as possible!

haxybaxy commented 3 months ago

Thank you so much! If there is anything I can do to help please let me know.

Jean-Tinland commented 3 months ago

I just merged this and made some optimizations on top of adding the toggle setting.

I ran SVGOMG (see procedure in this comment) on the apple logo and added it to the icon library of the project. That way, the icon is lazy loaded only if needed.

The new setting is set to false by default so people won't automatically see this decoration pop on their next pull.

I documented this feature here.

Thanks again for the idea and your pull request. We'll see in the future if anyone feel the need to be able to personalize the displayed icon.