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

[Question] ChromeOS style and related problems #619

Open
madfanat opened this issue Jun 2, 2024 · 6 comments
Open

[Question] ChromeOS style and related problems #619

madfanat opened this issue Jun 2, 2024 · 6 comments

Comments

@madfanat
Copy link

madfanat commented Jun 2, 2024

Is your question related to a problem? Please describe.
I've tried to set specific border-radius for the edge nodules, but without success. The settings apply to the children of the children of the bar, not the children of the bar. For example, #bar #start .item:not(:first_child):not(:last_child) applies to workspace entries, but no to the workspace widget itself. Here's exactly what I tried:

#bar #end {
}
#bar #end .item:not(:first_child):not(:last_child) {
}
#bar #end > *:nth-child(1) {
}
#bar #end :not(:first_child):not(:last_child) {
}
#bar #end:not(:first_child):not(:last_child) {
}

Describe the solution you'd like

  • Setting specific border-radius for the first and the last modules on the right side of the bar
  • Hide the tray widget when there are no items so it doesn't take up space
  • Hide the notification widget when there are no notifications so it doesn't take up space

Describe alternatives you've considered

Additional context
image

@JakeStanger
Copy link
Owner

Setting specific border-radius for the first and the last modules on the right side of the bar

For this you can use the .widget selector, eg .widget:first-child to select the first in any of start/center/end (or be specific with .workspace:first-child).

Hide the tray widget when there are no items so it doesn't take up space

Currently this is not possible through Ironbar itself, although I am possibly looking to change that as part of the next update or so.

You could potentially do this using show_if and an external script which checks DBus. You can look at org.kde.StatusNotifierWatcher StatusNotifierWatcher and the RegisteredStatusNotifierItems property.

image

Hide the notification widget when there are no notifications so it doesn't take up space

Same story as above currently. swaync exposes a pretty good DBus interface you can query to find the count:

image

@madfanat
Copy link
Author

madfanat commented Jun 2, 2024

For this you can use the .widget selector, eg .widget:first-child to select the first in any of start/center/end (or be specific with .workspace:first-child).

Well, I guess it applies to the first element of the module (like the first instance of a clock or volume control). But I want it to apply to the edge widgets on the right side of the bar. In this case, the first would be the volume control and the last would be the notification widget. And I want to apply border-radius to the widget itself, not to its child items. Here's what I got now:

image

@JakeStanger
Copy link
Owner

Well, I guess it applies to the first element of the module

Incorrect, it applies to any widget which is the first in its container. So you can do

.end .widget:first-child

or

.end .volume:first-child

to select it

@madfanat
Copy link
Author

madfanat commented Jun 2, 2024

Oh, then I'll try to explain more clearly. I want to work with the edge widgets (containers?) on the right side of the bar. In this case, I'm representing the list like this: [volume, clock, notifications]. And I want to select the first and the last items of the list and assign certain properties to them. In this case it would be volume and notification widgets.

@JakeStanger
Copy link
Owner

Have you tried the selectors above to see if they work for you?

@madfanat
Copy link
Author

madfanat commented Jun 2, 2024

Yeah, I've tried that and I don't see any impact for some reason.
What I want would just be a contraction of

.volume, 
.clock {
  border-radius: 0;
}

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

No branches or pull requests

2 participants