Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add side icon #415

Merged
merged 10 commits into from
Aug 6, 2024
Merged

Add side icon #415

merged 10 commits into from
Aug 6, 2024

Conversation

haxybaxy
Copy link
Contributor

@haxybaxy haxybaxy commented Aug 4, 2024

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

  • New feature (non-breaking change which adds functionality)

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:

  • side-icon.jsx (for the component)
  • side-icon.js (for the styles)
    and added the component to the index.jsx

System Settings

  • OS version Sonoma 14.5
  • Yabai version 6.0.1
  • Übersicht version 1.6 (82)

@Jean-Tinland
Copy link
Owner

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
Copy link
Contributor Author

haxybaxy commented Aug 6, 2024

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

@Jean-Tinland Jean-Tinland merged commit b6867de into Jean-Tinland:master Aug 6, 2024
@Jean-Tinland
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants