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

Allow to use SVG as icons #1330

Open
sn3w opened this issue Nov 29, 2021 · 12 comments
Open

Allow to use SVG as icons #1330

sn3w opened this issue Nov 29, 2021 · 12 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@sn3w
Copy link

sn3w commented Nov 29, 2021

Icons like Octicons provide SVG files for setting up icons and I'll love to see Waybar support having SVG set as icons.

@Alexays Alexays added the enhancement New feature or request label Mar 8, 2022
@Moelf
Copy link

Moelf commented Jul 24, 2022

would love to be able to use things like https://heroicons.com/

@gutfacehubook
Copy link

Would love to use https://materialdesignicons.com/ in the waybar.

@hanckmann
Copy link

hanckmann commented Sep 26, 2022

Personally I am not interested in additional icon themes, but svg icon support would be a very welcoming addition.

What is required to get svg support in waybar / systray. My issue is mainly the svg icons in the systray which do not show up.

@Alexays Alexays added help wanted Extra attention is needed good first issue Good for newcomers labels Oct 27, 2022
@Alexays Alexays pinned this issue Oct 27, 2022
@Alexays Alexays unpinned this issue Nov 15, 2022
@gutfacehubook
Copy link

As workarround i found it is able to load svg as background image:
waybar

// waybar config
...
"modules-left": [ "custom/logo", ... ]
...
"custom/logo": {
  "format": "    ",
  "tooltip": false,
  "on-click": "exec lain.sh &"
},
...
/* waybar style.css */
...
#custom-logo {
  background-image: url('/home/lain/.config/waybar/void.svg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain; 
}
...

i know this is not the best way to do, but I wanted to share this temporary method I'm using for now.

@sandmuel
Copy link

As workarround i found it is able to load svg as background image: waybar

// waybar config
...
"modules-left": [ "custom/logo", ... ]
...
"custom/logo": {
  "format": "    ",
  "tooltip": false,
  "on-click": "exec lain.sh &"
},
...
/* waybar style.css */
...
#custom-logo {
  background-image: url('/home/lain/.config/waybar/void.svg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain; 
}
...

i know this is not the best way to do, but I wanted to share this temporary method I'm using for now.

Any way to do something like this on a module with multiple states? (such as the battery module)

@5p4r74cu5
Copy link

5p4r74cu5 commented Jan 5, 2024

I would really like to be able to use svg icons, as doing something like using bitone/duotone icons is possible with fonts as far as I can tell, and it would make a massive difference in customisability.

@jlo62
Copy link

jlo62 commented Jan 23, 2024

Would love to use https://materialdesignicons.com/ in the waybar.

workaround: Arch AUR has ttf-material-design-icons-git.

@Ifaen
Copy link

Ifaen commented Apr 18, 2024

I assume your workaround of using it as a background image doesn't allow to change it's color right?

@jlo62
Copy link

jlo62 commented Apr 19, 2024

allow to change it's color right?

Just change the color of the svg with, for example, a text editor or inkscape?

@Ifaen
Copy link

Ifaen commented Apr 24, 2024

allow to change it's color right?

Just change the color of the svg with, for example, a text editor or inkscape?
Sorry, I should've added that change the color of the svg dinamically, like with pywal or make the fill attribute usable to allow it being dinamic, but I suppose that's no easy task or limitations of gtk

@Lodobo
Copy link

Lodobo commented May 12, 2024

@sfuentesojeda The correct way to do this would be to style the svg icon with CSS, just like you would in a browser.

@tom-gora
Copy link

tom-gora commented Aug 9, 2024

Unfortunately theming anything gtk or pango related painfully reminds my that it is not a browser and, with all its faults and baggage, how many light years ahead web is in terms of layout and styling compared to what is available in the native toolkits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests