Closed scott-carrion closed 11 months ago
yes your guess is correct, I am not bundling any icons used for the buttons and menus, mainly because it breaks dark mode or custom icon sets, and instead I am using icons provided by the desktop environment according to the freedesktop icon naming spec.
Using this spec is strongly recommended:
This section describes the standard icon names that should be used by artists when creating themes, and by developers when writing applications which will use the Icon Theme Specification.
I just did some testing and it seems that setting XDG_CURRENT_DESKTOP
is enough for the icons to change, I am on KDE and there the var is just KDE
.
So this is good to know thank you, I will add that to the readme.
I don't think this is a keyboard-center bug, but rather a recommended tweak for i3 users. This is an environment issue I found and I'll share how I got around it.
If you use i3, you might notice that the icons for the UI buttons are missing. This can make it a little difficult to use the GUI.
I have GNOME installed on my machine, and when running keyboard-center within GDM there's no issue: The icons show up fine.
I haven't dug into the code, but I think that the reason this happens is because depending on the desktop environment, the GUI library tries to choose appropriate, built-in icons. For i3, it seems there are none by default (which is technically true: i3 alone does not include any icons). Again, this is only speculation on my part.
In order to use the GNOME icons while running keyboard-center in i3, I set the
XDG_SESSION_DESKTOP
ANDXDG_CURRENT_DESKTOP
variables for the execution of keyboard-center only.Here's how to do that:
XDG_SESSION_DESKTOP=GNOME XDG_CURRENT_DESKTOP=GNOME /usr/bin/keyboard-center
If you have KDE or something else installed and want to do something similar, you can find what vars should be set using
env | grep XDG
to see what those vars should be when running in i3.