-
-
Notifications
You must be signed in to change notification settings - Fork 410
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
[BUG] Systray not working correctly with all:unset #1067
Comments
My systray widget as the css class
|
Could you send your config ? For me it works with:
|
My config. For more details, here you will find eww.yuck and eww.scss: https://github.com/JuanH88/gh0stzk_1080p/tree/master/config/bspwm/rices/andrea/andy.
|
Well, I copy-pasted your config on my computer and here is the result However I noticed you were using |
Oh, so could it be the composer? In picom I have set corner-radius = 6, now I set it to 60 and the error persists, the menu was not affected, it is exactly the same, maybe it is something else. |
No, I don't think it's the compositor, I was saying that you may not have the very latest version of eww, which would explain why it works for me (I'm on the latest commit) |
try setting border-radius to zero in your gtk.css. Eww windows somehow respect the system gtk configuration. Had the same issue, but fixed by setting border radius to zero in gtk.css. here is my
|
Thank you all for your contributions that helped me customize my config. However, I found out a problem with the current approach ... that there are no arrows to indicate sub-menus, check boxes or radio buttons. After searching for long and some trial and error, I figured out how to get these working ... (please read the CSS comments I left) .systray menu {
border-radius: $borderRadius;
padding: 0.33em;
color: $white;
background-color: $altBg;
/*
>menuitem matches menuitem elements nested directly inside menu
*/
menuitem {
padding: 0.25em;
arrow {
/*
Symbolic icons from your icons theme
EXAMPLE: (using Papirus-Dark icons)
1. run `find /usr/share/icons/Papirus-Dark/symbolic | grep <YOUR-ICON-NAME>`
2. use the name without the .svg part like what i did below
*/
-gtk-icon-source: -gtk-icontheme("pan-end-symbolic");
color: $white;
// min-width and min-height are required for the icon to be rendered
min-width: 1em;
min-height: 1em;
}
/*
& before pseudo element means nesting selector modifiers
so instead of
menuitem:disabled{
}
you type:
menuitem {
&:disabled{
}
}
*/
radio{
// min-width and min-height are required for the icon to be rendered
min-width: 1em;
min-height: 1em;
padding-right: 0.5em;
/*
How to get the url for icon?
1. Use your terminal to go to gtk-3.0 sub-directory inside your gtk theme directory,
`/usr/share/themes/<YOUR-GTK-THEME>/gtk-3.0/` NOTE: also works for `~/.themes`
EXAMPLE: I use arc-dark theme, so for me it's `/usr/share/themes/Arc-Dark/gtk-3.0/`
2. View contents of either `gtk.css` or `gtk-dark.css`, for me it looks like this
`@import url("resource:///org/gnome/arc-theme/gtk-main-dark.css");`
the important part is `url("resource:///org/gnome/arc-theme/")`
3. run `gresource list <NAME-OF-GRESOURCE-FILE>.gresource` in the same directory to
list all files inside of it or even easier, pipe it to grep to pick the icon you want.
EXAMPLE: `gresource list gtk.gresource | grep radio-checked-dark`
RESULT: `
/org/gnome/arc-theme/assets/radio-checked-dark.png
/org/gnome/arc-theme/assets/[email protected]
`
The @2 variant is a an additional scale
SEE: https://docs.gtk.org/gtk3/css-overview.html#using-themed-icons-in-css
I'm not concerned so I'll just pick the intended one
4. Merging the two would be:
`url("resource:///org/gnome/arc-theme/assets/radio-checked-dark.png")`
*/
/*
Scale 2 can be added through:
`-gtk-icon-source: -gtk-scaled(url(...), url(..<SCALE-2>..));`
*/
-gtk-icon-source: -gtk-scaled(url("resource:///org/gnome/arc-theme/assets/radio-unchecked-dark.png"));
&:checked {
-gtk-icon-source: -gtk-scaled(url("resource:///org/gnome/arc-theme/assets/radio-checked-dark.png"));
&:hover {
-gtk-icon-source: -gtk-scaled(url("resource:///org/gnome/arc-theme/assets/radio-checked-selected.png"));
}
}
&:hover {
-gtk-icon-source: -gtk-scaled(url("resource:///org/gnome/arc-theme/assets/radio-unchecked-selected.png"));
}
}
check{
// same as before, min-width and min-height are required for the icon to be rendered
min-width: 1em;
min-height: 1em;
padding-right: 0.5em;
-gtk-icon-source: -gtk-scaled(url("resource:///org/gnome/arc-theme/assets/checkbox-unchecked-dark.png"));
&:checked {
-gtk-icon-source: -gtk-scaled(url("resource:///org/gnome/arc-theme/assets/checkbox-checked-dark.png"));
&:hover {
-gtk-icon-source: -gtk-scaled(url("resource:///org/gnome/arc-theme/assets/checkbox-checked-selected.png"));
}
}
&:hover {
-gtk-icon-source: -gtk-scaled(url("resource:///org/gnome/arc-theme/assets/checkbox-unchecked-selected.png"));
}
}
&:disabled label { color: $trayDisabled; }
&:hover {
arrow { color: $bg; }
background-color: $accentColor;
color: $bg;
}
}
separator {
background-color: $bg;
padding-top: 0.06em;
&:last-child {
padding: unset;
}
}
}
So it just becomes a matter of getting the icon theme and GTK theme As for the problem with rounded-corners, I run river (wayland compositor) and it doesn't give control over compositing as it will require significant change to code and the developer decided to delay eye-candy features, but I found out that changing the color from hex Also, you'll find the tooltip of systray icons transparent ... to control that you can use tooltip {
background-color: $altBgRadius;
border-radius: $borderRadius;
color: $white;
} |
And if someone is interested, here are the variables I use in my SCSS file $bg: #282828;
$white: #d4be98;
$grey: #5a524c;
$red: #ea6962;
$yellow: #d8a657;
$green: #a9b665;
$blue: #7daea3;
$cyan: #89b482;
$purple: #d3869b;
$accentColor: $red;
$altBg: #45403d;
$altBgRadius: rgba(69, 64, 61, 0.99);
$trayDisabled: #7c6f64;
$borderRadius: 0.6em; |
I stumbled upon this issue because I was seeing weird inconsistent behaviour when using
Despite using identical I ended up solving it by using
I'm thinking maybe the |
Checklist before submitting an issue
Description of the bug
I use a property Global all: unset necessary for my bars to look good, but systray does not work as it should, it does not allow you to set the background color. Attached images.
Reproducing the issue
No response
Expected behaviour
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: