Closed Crystal4276 closed 1 year ago
None of those settings would do anything yet.
This is related to your vertical adjustment question too.
I'd be inclined to use padding_x
as a horizontal offset.
I'd be inclined to use padding_x as a horizontal offset.
Cool !
OK - easy fix. Will add tonight.
On a second though, if it is a pure x offset yes it will be ok. But if it adds some space on both left and right, i will have an issue with the further grouping of status.notifier.
The plan would be for it to just be an initial offset.
Padding_x working !
Oups no, i found an issue. The padding_x seems only applied to the icon and not the bar (in "both" configuration). So that the icon overlap with the bar if padding_x is too large.
Have pushed a fix. Please try again and, if there's still an issue, take a screenshot.
Icon cut when the bar is not active (it's ok when the bar is active)
I'm not 100% sure, but it looks there is an issue with the text inside the bar.
It's not centered ? Or it's the same cause of cut affecting the icon ?
That cutting off should be fixed now.
The cutting off is removed in "both" mode I did some bonus testing in 'bar' and 'icon' mode. The bar mode has still the same cutoff issue.
I see a little space remaining between alsa widget and status.notifier.
But that's just me being picky....
Playing with background color, it looks due to RectDecoration rather than the widgets themselves.
Padding on the decoration is applied to both ends.
If you're on the git version, you could try setting the extrawidth
parameter of that decoration to a negative number to see if shortens it. No idea if that would work!
Can you show a picture of the bar cutoff issue?
The bar cut:
If you're on the git version, you could try setting the extrawidth parameter of that decoration to a negative number to see if shortens it. No idea if that would work!
I tried that one but it doesn't work. Although the padding_x of decoration was set to 0, there is a space at the beginning of each group that i can't remove. I found a "trick" using:
widget.TextBox(
text=" ",
fontsize=1,
foreground=colors[15],
background=colors[1],
padding=-10,
**decor_exit,
It works upon reloading qtile config but crash when restarting qtile ! But i guess this is for a separate issue.
Is the cut issue the end of the text being cut off or the gap at the beginning?
The end of the text being cut off. I could see the same issue in "both" mode before you fixed it.
Ok. I'll take a look later.
It's weird as it shouldn't happen. The minimum size of the bar should always be enough to show "100%".
I've obviously made a mistake somewhere.
I can't recreate the bar cutoff issue. It's always drawn correctly for me.
Then I assume it's a quirk due to my configuration of qtile bar. I have grouping enabled with the status.notifier next to it.
What is weird is that i don't see this issue in "both" mode. Only in "bar" mode
You could always adjust the bar_width
parameter and just make it a bit bigger.
Can you share your config for that widget (including the decoration) and I'll try using your settings.
I only used this for testing. After qtile startup, you will have a split second to catch the volume bar before it fades. (getting the screenshot was an experience)
Decoration
decor_exit = {
"decorations": [
RectDecoration(
#colour="#45475a",
use_widget_background=True,
line_width= 0,
radius=[15, 15, 15, 15],
filled=True,
padding_y=10,
padding_x=0,
group=True,
clip=True,
#extrawidth=-10,
)
],
}
Four widgets grouped:
widget.ALSAWidget(
mouse_callbacks={"Button1": lazy.spawn("pavucontrol")},
mode='bar',
theme_path="/usr/share/icons/Papirus-Dark",
icon_size=32,
fontsize=20,
padding_y=0,
padding_x=8,
bar_width=60,
bar_colour_high=colors[10],
bar_colour_loud=colors[15],
bar_colour_normal=colors[13],
foreground=colors[5],
background=colors[1],
update_interval=5,
hide_interval=2,
**decor_exit,
),
widget.StatusNotifier(
icon_size=32,
icon_theme="/usr/share/icons/kora",
padding = 10,
hide_after=0.1,
menu_width=385,
show_menu_icons=True,
background=colors[1],
highlight_colour=colors[6],
menu_background=colors[1],
menu_foreground=colors[0],
separator_colour=colors[15],
menu_fontsize = 16,
**decor_exit,
),
widget.TextBox(
text="",
fontsize=22,
foreground=colors[15],
background=colors[1],
padding=-5,
**decor_exit,
),
widget.TextBox(
mouse_callbacks={"Button1": lazy.spawn("archlinux-logout")},
#exit_script='archlinux-logout',
font = "FontAwesome",
text="",
fontsize=27,
foreground=colors[5],
background=colors[1],
padding=12,
**decor_exit,
),
I forgot the block of color you may need:
def init_colors():
return [["#cdd6f4", "#cdd6f4"], # color 0 Text (Blue)
["#1e1e2e", "#1e1e2e"], # color 1 Base
["#9399b2", "#9399b2"], # color 2 Overlay 2
["#f5c2e7", "#f5c2e7"], # color 3 Pink
["00000000", "00000000"], # color 4 Transparent
["#f3f4f5", "#f3f4f5"], # color 5 White
["#45475a", "#45475a"], # color 6 Surface 0 Catppuccin Mocha
["#1e1e2ea9", "#1e1e2ea9"], # color 7 Base with 66% transparency
["#f3f4f500", "#f3f4f500"], # color 8 White 66 % Tranparency
["#11111b", "#11111b"], # color 9 Crust
["#fab387", "#fab387"], # color 10 Peach
["#f9e2af", "#f9e2af"], # color 11 Yellow
["#a6e3a1", "#a6e3a1"], # color 12 Green
["#94e2d5", "#94e2d5"], # color 13 Teal (Blue/Green)
["#eba0ac", "#eba0ac"], # color 14 Maroon (Reddish/pink)
["#f38ba8", "#f38ba8"], # color 15 Red
["#89dceb", "#89dceb"], # color 16 Sky (Blue)
]
colors = init_colors()
I'm trying to adjust the position of the icon inside the ALSA widget using the available options from the documentation. The speaker icon is a bit too much on the left:![image](https://user-images.githubusercontent.com/27446196/199463157-425bf435-049c-4bd8-b94d-1ccf02c0a599.png)
Unfortunately i could not observe any effect of the padding_x, margin_x and margin_y arguments.