Cursor not set properly
Output of awesome --version:
awesome v4.2 (Human after all)
• Compiled against Lua 5.3.3 (running with Lua 5.3)
• D-Bus support: ✔
• execinfo support: ✔
• xcb-randr version: 1.5
• LGI version: 0.9.2
Description:
When I hover my cursor over the desktop/wallpaper, it turns to the one I set in lxappearance, but when I hover it over windows and the panel, it turns into the default one.
Sometimes this happens when you change your cursor theme without relogging in your desktop afterwards. Try relogging and see if all windows use the same cursor theme.
Does the new cursor theme get applied when you restart awesome (as in: right click desktop -> awesome -> restart)?
During startup, AwesomeWM initialises the xcb-cursor library. At this time, xcb-cursor opens the "cursor" font in the server and looks up Xcursor.theme in the current resource manager settings (think: ~/.Xdefaults): https://cgit.freedesktop.org/xcb/util-cursor/tree/cursor/cursor.c#n148
No idea how lxappearence changes the cursor theme, but I guess one of these things must be modified, but nothing is reloaded after this change is applied...
@psychon No, it doesn't get applied after restarting awesome.
Why yet is not possibly use a Custom Cursor theme on AwesomeWm?
because @AdsonCicilioti don't want to submit a pull request with that feature
because @AdsonCicilioti don't want to submit a pull request with that feature
Of course, I can try, but I'm not familiar with the Lua language and I don't know how AwesomeWm gets the cursor settings. From the little I investigated, Awesome gets the cursor definitions from X. That is, it looks like Awesome doesn't have a wrapper to hold your custom cursor. Say if I'm wrong. Give me a way, which I will definitely try to help. With a little time and INCENTIVE anyone can help. I can dig through the source code, but a little more friendliness and goodwill helps.
@Unlimiter , I discovered the problem, I believe it is the same as mine by what you reported.
I found out where AwesomeWm is getting the Cursor Theme settings. From the ~/.icons/default/index.theme file.
Apparently it was generated by Lxappearence - at the time it was installed, because when changing the theme of cursors and saving by lxappearence the file is not modified, it always has the attribute Inherits=Adwaita, which is where Awesome is reference.
So the workaround is to manually put your cursor theme name in Inherits=. After that just reload Awesome.
Ah! also check the ~/.config/gtk-3.0/settings.ini file where the gtk-cursor-theme-name property was also with Adwaita. I don't know how this affects it, but for safety put your favorite Cursor's name there too!
Another point is that deleting the file doesn't solve it, as it makes AwesomeWm use the file definitions there in /usr/share/icons/default/index.theme which also has the Inherits=Adwaita attribute.
Another curiosity is that after deleting ~/.icons/default/index.theme, going to Lxappearence and choosing another cursor theme, it won't recreate it.
I'm claiming here that Awesome is taking the definitions from these files, but I don't know if that's true, so just consider it a speculation. It suspects that whoever is providing this definition is the X server.
It would be interesting if Awesome somehow directs the priority for these definitions to the ~/.gtkrc-2.0 file, managed by Lxappearence, and that yes is modified as we change and save the themes. Lxappearence maintainers could even improve the management of these settings outside the LXDE Environment, but first we can bring this knowledge to them to decide what to do.
Regardless of the responsibilities, we already have the knowledge. Do what you think best.
@actionless , Does this help in any way?
For the record: @AdsonCicilioti++
Also for the record: AwesomeWM uses xcb/util-cursor for "cursor things". This library seems to go something like this:
- First, if
$XCURSOR_PATHis not set, pretend it is set to~/.icons:/usr/share/icons:/usr/share/pixmaps:/usr/X11R6/lib/X11/icons(but this fallback can be changed at configure time) - When asked to load a cursor
namefromtheme, each entry of$XCURSOR_PATHis checked for a sub-file$THEME/cursors/$NAME_OF_THE_CURSOR - If that file does not exist, the fallback theme is read from
$THEME/index.theme. This looks for theInheritsentry that @AdsonCicilioti found. - The cursor theme is detected from Xresources
Xcursor.themeand if that is not set falls back todefault -
~/gtkrc-2.0is not involved in any of these
So, if you simply want to set your cursor theme, try adding Xcursor.theme: foo to your ~/.Xdefaults. This should hopefully be enough to set the cursor theme everywhere and should even override the ~/.icons/default/index.theme that lxappearance seems to create.