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

Enable pango markup for sway workspace labels #203

Merged
merged 2 commits into from
Apr 24, 2023

Conversation

moetayuko
Copy link
Contributor

This allows using pango markups for labels, which enables fine-grained controls and is also supported by waybar.

Example:

"custom-labels": [
  "1 <span font='Font Awesome 6 Free 10'>\uf120</span>",
  "2 <span font='Font Awesome 6 Brands 10'>\uf269</span>",
  "3 <span font='Font Awesome 6 Free 10'>\uf121</span>",
  "4 <span font='Font Awesome 6 Free 10'>\uf07b</span>",
  "5 <span font='Font Awesome 6 Brands 10'>\ue3d9</span>",
  "6 <span font='Font Awesome 6 Free 10'>\uf1c2</span>",
  "7 <span font='Font Awesome 6 Free 10'>\uf075</span>",
  "8 <span font='Font Awesome 6 Free 10'>\uf0e0</span>"
],

demo

The labels now support pango markups which contains spaces, so
space-separated labels on a single line is no longer applicable.
Convert the widget to a textview to address the issue, where each line
corresponds to a label.
@moetayuko
Copy link
Contributor Author

@nwg-piotr could you take a look at this?

@nwg-piotr
Copy link
Owner

Tomorrow, sorry. It's 4:10 here.

@nwg-piotr nwg-piotr merged commit 12e510c into nwg-piotr:master Apr 24, 2023
@nwg-piotr
Copy link
Owner

Merged.

As I'm still working in golang tonight: could you review #191 & #193? Some conflicts seem to have appeared after merging your PRs.

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