SysTray icon size too small
See original GitHub issueIssue description
The blueman-applet
, nm-applet
, ferdi
icons are too small compared to the expected size of the flameshot
one.
Qtile version
ArchLinux:0.18.1-3
Stack traces
2021-10-23 11:43:27,396 ERROR libqtile
bar.py:_configure_widget():L274 Systray widget crashed during _configure with error: AttributeError("'Core' object has no attribute 'conn'")
This one seemed interesting to me, although it’s pretty old and there hasn’t been something like that since. Before this one, there were like 10 of these.
Configuration
import os
import subprocess
from typing import List
from libqtile import bar, layout, widget, hook, qtile
from libqtile.config import Click, Drag, Group, Key, Match, Screen
from libqtile.command import lazy, client
def focus_previous_group(qtile):
group = qtile.current_screen.group
group_index = qtile.groups.index(group)
previous_group = group.get_previous_group(skip_empty=True)
previous_group_index = qtile.groups.index(previous_group)
if previous_group_index < group_index:
qtile.current_screen.set_group(previous_group)
def focus_next_group(qtile):
group = qtile.current_screen.group
group_index = qtile.groups.index(group)
next_group = group.get_next_group(skip_empty=True)
next_group_index = qtile.groups.index(next_group)
if next_group_index > group_index:
qtile.current_screen.set_group(next_group)
mod = "mod4"
terminal = "terminator"
keys = [
Key([mod], "Up", lazy.group.prev_window()),
Key([mod], "Down", lazy.group.next_window()),
Key([mod], "Left", lazy.function(focus_previous_group)),
Key([mod], "Right", lazy.function(focus_next_group)),
Key([mod, "control"], "Right",
lazy.layout.grow_right(),
lazy.layout.grow(),
lazy.layout.increase_ratio(),
lazy.layout.delete(),
),
Key([mod, "control"], "Left",
lazy.layout.grow_left(),
lazy.layout.shrink(),
lazy.layout.decrease_ratio(),
lazy.layout.add(),
),
Key([mod, "control"], "Up",
lazy.layout.grow_up(),
lazy.layout.grow(),
lazy.layout.decrease_nmaster(),
),
Key([mod, "control"], "Down",
lazy.layout.grow_down(),
lazy.layout.shrink(),
lazy.layout.increase_nmaster(),
),
Key([mod, "shift"], "Up", lazy.layout.shuffle_up()),
Key([mod, "shift"], "Left", lazy.layout.shuffle_left()),
Key([mod, "shift"], "Right", lazy.layout.shuffle_right()),
Key([mod, "shift"], "Down", lazy.layout.shuffle_down()),
Key([mod], "Tab", lazy.next_layout()),
Key([mod, "shift"], "Tab", lazy.prev_layout()),
Key([mod], "n", lazy.layout.normalize()),
Key([mod], "KP_Enter", lazy.window.toggle_fullscreen()),
Key([mod, "shift"], "KP_Enter", lazy.window.toggle_floating()),
Key([mod], "q", lazy.window.kill()),
Key([mod, "shift"], "r", lazy.restart()),
Key([mod, "shift"], "q", lazy.shutdown()),
Key([mod], "v", lazy.validate_config()),
Key([mod], "Return",
lazy.spawn(terminal)),
Key([mod], "f",
lazy.spawn("nemo")),
# Key([mod], "a",
# lazy.spawn("nwggrid")),
Key([mod], "a",
lazy.spawn("rofi -show drun -terminal terminator")),
Key([mod], "x",
lazy.spawn("nwgbar")),
Key([mod], "c",
lazy.spawn("google-chrome-stable")),
Key([], "Print",
lazy.spawn("flameshot screen -p /home/ervin/Pictures")),
Key([], "XF86AudioRaiseVolume",
lazy.spawn("/home/ervin/.scripts/vol_up")),
Key([], "XF86AudioMute",
lazy.spawn("/home/ervin/.scripts/vol_mute")),
Key([], "XF86AudioLowerVolume",
lazy.spawn("/home/ervin/.scripts/vol_down")),
Key([], "XF86AudioPrev",
lazy.spawn("/home/ervin/.scripts/spotify_left")),
Key([], "XF86AudioPlay",
lazy.spawn("/home/ervin/.scripts/spotify_pause")),
Key([], "XF86AudioNext",
lazy.spawn("/home/ervin/.scripts/spotify_right")),
Key([], "XF86MonBrightnessUp",
lazy.spawn("brightnessctl s 10%+")),
Key([], "XF86MonBrightnessDown",
lazy.spawn("brightnessctl s 10%-"))
]
groups = []
group_names = 'coding media www social settings etc'.split()
group_labels = ["", "", "", "", "", ""]
group_layouts = ["bsp", "monadtall", "zoomy", "zoomy", "bsp", "bsp"]
for i in range(len(group_names)):
groups.append(
Group(
name=group_names[i],
layout=group_layouts[i].lower(),
label=group_labels[i],
))
@hook.subscribe.client_new
def assign_app_group(client):
d = {}
d[group_names[0]] = [
"terminator",
"atom",
"subl",
"geany",
"brackets",
"code-oss",
"code",
"thunar",
"nemo",
"caja",
"nautilus",
"org.gnome.nautilus",
"pcmanfm",
"pcmanfm-qt",
"Atom",
"Subl",
"Geany",
"Brackets",
"Code-oss",
"Code",
"Thunar",
"Nemo",
"Caja",
"Nautilus",
"org.gnome.Nautilus",
"Pcmanfm",
"Pcmanfm-qt",
]
d[group_names[1]] = [
"Spotify",
"Pragha",
"Clementine",
"Deadbeef",
"Audacious",
"spotify",
"pragha",
"clementine",
"deadbeef",
"audacious",
"anbox",
"TelegramDesktop",
"Discord",
"telegramDesktop",
"discord",
"Vlc",
"vlc",
"Mpv",
"mpv",
"obs",
]
d[group_names[2]] = [
"Firefox",
"Chromium",
"firefox",
"chromium",
"google-chrome",
"qbittorrent"
]
d[group_names[3]] = [
"ferdi",
]
d[group_names[4]] = [
"gnome-control-center",
"blueman-manager",
"nitrogen",
"pling-store"
]
wm_class = client.window.get_wm_class()[0]
for i in range(len(d)):
if wm_class in list(d.values())[i]:
group = list(d.keys())[i]
client.togroup(group)
client.group.cmd_toscreen(toggle=False)
for i, name in enumerate(group_names, 1):
keys.extend([
Key([mod], str(i), lazy.group[name].toscreen()),
Key([mod, 'shift'], str(i), lazy.window.togroup(name))])
layouts = [
layout.Bsp(
margin=5,
fontsize=20,
border_width=2,
border_focus="#3ca4c9"),
layout.Zoomy( # !!CHECK DOCS FOR THIS ONE!!
margin=5,
columnwidth=150,
fontsize=20,
border_width=2,
border_focus="#3ca4c9"),
layout.Max(
margin=5,
fontsize=20,
border_width=2,
border_focus="#3ca4c9"),
layout.MonadTall(
margin=5,
fontsize=20,
border_width=2,
border_focus="#3ca4c9"),
layout.MonadWide(
margin=5,
border_width=2,
border_focus="#3ca4c9"),
]
widget_defaults = dict(
font='CodeNewRoman Nerd Font Mono Bold',
fontsize=15,
padding=3,
)
extension_defaults = widget_defaults.copy()
colors_nord = ["#2e3440", # 0
"#3b4252", # 1
"#434c5e", # 2
"#4c566a", # 3
"#d8dee9", # 4
"#e5e9f0", # 5
"#eceff4", # 6
"#8fbcbb", # 7
"#88c0d0", # 8
"#81a1c1", # 9
"#5e81ac", # 10
"#bf616a", # 11
"#d08770", # 12
"#ebcb8b", # 13
"#a3be8c", # 14
"#b48ead", # 15
]
screens = [
Screen(
top=bar.Bar(
[
widget.Image(
filename="~/.config/qtile/icons/arch.svg",
margin=5,
mouse_callbacks=
{'Button1': lambda: qtile.cmd_spawn("rofi -show drun")}
),
widget.Spacer(
length=3),
widget.CurrentLayoutIcon(
scale=0.6
),
widget.Spacer(
length=3),
widget.GroupBox(
font='Font Awesome 5 Free Solid',
fontsize=12,
highlight_method='block',
block_highlight_text_color=colors_nord[4],
inactive=colors_nord[3],
active=colors_nord[4],
padding_y=7,
rounded="true"
),
widget.Spacer(
length=3),
widget.GenPollText(
fmt="{}",
update_interval=0.1,
foreground=colors_nord[10],
func=lambda:
subprocess.check_output("/home/ervin/.scripts/window_name").decode("utf-8")
),
widget.Spacer(
length=bar.STRETCH
),
widget.Clock(
format='%A, %B %d - %H:%M',
padding=2,
foreground=colors_nord[10],
# fontsize=18
),
widget.Spacer(
length=bar.STRETCH
),
widget.TextBox(
font='Font Awesome 5 Free Solid',
text="",
padding_y=-20,
foreground=colors_nord[15]
),
widget.PulseVolume(
foreground=colors_nord[15]
),
widget.Spacer(
length=10),
widget.TextBox(
font='Font Awesome 5 Free Solid',
text="",
padding=2,
foreground=colors_nord[13]
),
widget.Spacer(
length=3),
widget.Backlight(
padding=0,
backlight_name="intel_backlight",
foreground=colors_nord[13]
),
widget.Spacer(
length=10),
widget.Systray(
icon_size=19,
# background="#2e3440.9",
margin=1
),
widget.Spacer(
length=10),
widget.Battery(
format="{percent:2.0%}",
update_interval=5,
foreground=colors_nord[14]
),
widget.GenPollText(
update_interval=1,
foreground=colors_nord[14],
font="Font Awesome 5 Free Solid",
func=lambda:
subprocess.check_output("/home/ervin/.scripts/bat_icon").decode('utf-8')
),
widget.GenPollText(
update_interval=1,
foreground=colors_nord[14],
font="Font Awesome 5 Free Solid",
fontsize=11,
func=lambda:
subprocess.check_output("/home/ervin/.scripts/bat_charging_icon").decode('utf-8')
),
widget.Spacer(
length=10),
widget.TextBox(
text="",
font="Font Awesome 5 Free Solid",
mouse_callbacks=
{'Button1':
lambda:
subprocess.run('nwgbar')},
foreground=colors_nord[11]
),
widget.Spacer(
length=10),
],
30,
margin=5,
background="#2e3440.9",
opacity=1.0,
),
),
]
# Drag floating layouts.
mouse = [
Drag([mod], "Button1", lazy.window.set_position_floating(),
start=lazy.window.get_position()),
Drag([mod], "Button3", lazy.window.set_size_floating(),
start=lazy.window.get_size()),
Click([mod], "Button2", lazy.window.bring_to_front())
]
@hook.subscribe.startup_once
def autostart():
home = os.path.expanduser('~/.config/qtile/autostart.sh')
subprocess.call([home])
follow_mouse_focus = True
bring_front_click = False
cursor_warp = False
floating_layout =layout.Floating(
float_rules=[
*layout.Floating.default_float_rules,
Match(wm_class='confirmreset'), # gitk
Match(wm_class='makebranch'), # gitk
Match(wm_class='maketag'), # gitk
Match(wm_class='ssh-askpass'), # ssh-askpass
Match(title='branchdialog'), # gitk
Match(title='pinentry'), # GPG key password entry
],
border_color="#fff")
auto_fullscreen = True
focus_on_window_activation = "smart"
reconfigure_screens = True
# If things like steam games want to auto-minimize themselves when losing
# focus, should we respect this or not?
auto_minimize = True
# XXX: Gasp! We're lying here. In fact, nobody really uses or cares about this
# string besides java UI toolkits; you can see several discussions on the
# mailing lists, GitHub issues, and other WM documentation that suggest setting
# this string if your java app doesn't work correctly. We may as well just lie
# and say that we're a working one by default.
#
# We choose LG3D to maximize irony: it is a 3D non-reparenting WM written in
# java that happens to be on java's whitelist.
wmname = "LG3D"
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (8 by maintainers)
Top Results From Across the Web
How to change the size of the system tray icon in Windows 10?
Right-click its traybar icon and select "Advanced options"; On the OptionsEx tab, scroll-down and find "tray_icons_padding "; If it's non-zero ...
Read more >How to Change the Size of Taskbar Icons in Windows 11 and 10
Taskbar icons · Navigate to your Desktop. · Click on Display Settings in the resulting context menu. · Move the slider under the...
Read more >System Tray Icons Showing Small Even When Taskbar Set To ...
The only problem with this method, is that it is still loading the smaller icons only larger. Which makes them look horrible. If...
Read more >Any way to increase the size of Notification/System tray icons ...
Right click on an empty spot on the task bar. In the window that pops up, under the Taskbar tab, check to see...
Read more >How To Change Icon Size (Windows 10) - Software Advice
Select the “Taskbar” tab and then click the “Use small taskbar buttons” switch to use small-sized icons. Under “Taskbar,” click on ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Tested on
stalonetray
and get exactly the same behaviour so I don’t think this is a Qtile issue but is more a limitation of how system tray icons are handled in X11.Closing.
Yeah. That was the conclusion that I was coming to too.