Comments (9)
I believe that's an X thing, what lxappearances does is something along the lines of
[icon theme]
Inherits=vimix-cursors-white
in /home/potato/.icons/default/index.theme
from xsettingsd.
You were right @derat, that code from lxappearance does the trick. I was trying without an actual GTK window (doing this with the C FFI from Common Lisp, because that's a million times easier for me) and it had no effect. Simply creating a GTK window and then using that code of setting the cursor in the root window propagated the change. Except for Steam, but I'm sure that's another beast.
So I guess to complete a mouse cursor theme change will need a little GTK helper program, or open/close lxappearance. I'm not sure why xsetroot
doesn't work, probably needs to go through GDK. (Theming on X is such a mess...)
Thanks for bearing with me, happy to hear any clever hacks around this, but I will close this.
from xsettingsd.
Yes, that's one of the places lxappearance writes to (along with gtk2 and gtk3 settings files). In this case though, it doesn't write anything, it is just upon opening it that the cursor theme is (correctly) changed for the desktop. An xsettingsd reload correctly changes the theme for programs, but for some reason this doesn't take everywhere. So something about just reading the GTK settings (when lxappearance starts) does it? Is there something that xsettingsd should/could be doing? Or something from the X side? Sorry if this isn't quite in the area of xsettingsd, but trying to understand where to fix this.
from xsettingsd.
Glad you've found it useful! My guess from glancing at lxappearance would be that https://github.com/lxde/lxappearance/blob/d132fdd829b1ed080f4c82a53b71d7e88dda8cc2/src/cursor-theme.c#L56 is the relevant code. Per the comment there, affected apps are probably ones that inherit the root window's cursor instead of watching XSETTINGS or GtkSettings (which gets automatically updated based on XSETTINGS, IIRC) and updating their own cursors. If that's correct, then what lxappearance is doing (iterating over screens and updating root window cursors) seems to be outside the scope of what xsettingsd does.
from xsettingsd.
can that be done using one of the xsetroot flags
from xsettingsd.
I suspect it can (I'm just using whatever the default cursor is on my system). See https://wiki.archlinux.org/index.php/Cursor_themes#Change_X_shaped_default_cursor.
from xsettingsd.
Unfortunately I tried with xsetroot
before and that doesn't update the cursor theme. I'm not sure if that's what is happening with lxappearance since the change happens immediately on program open (without going to the cursor theme tab or changing any settings), although maybe that is getting called anyway as part of initialization. I guess I'll try some of the low level GTK/GDK stuff to see what triggers the change on root windows...
By the way, for some context for all this theme switching, I'm using xsettingsd along with darkman to switch day/night themes. Overall it works well (you can see the basic scripts as part of my dot files, but this is the the most glaring annoyance remaining...
I'll leave this open for a little while to report if I figure it out, in case it is of use to anyone also relying on xsettingsd for these theme changes, although appears to be outside of the scope of xsettingsd.
EDIT: Yes, the code linked in the earlier comment from lxappearance is called in initialization. However, duplicating that part of the code doesn't seem to update the cursors for me...still that seems promising.
from xsettingsd.
Thanks for documenting your findings! And yeah, my experience has also been that it's pretty hit-and-miss which configuration mechanisms different apps use and how well they respond to changes (with font configuration being the absolute worst :-/).
I've added Gtk/CursorThemeName
to https://github.com/derat/xsettingsd/wiki/Settings, along with a link back to this issue.
from xsettingsd.
Thanks, and if anyone finds anything helpful, do share! I'll probably write something small that just pops up a GTK dialog to inform of a theme change (for my day/night changes) that can then reload the cursor settings. Or perhaps this can be taken care of with other theme switching utilities that exist. If I have anything helpful to report, I'll add it here for reference.
from xsettingsd.
Related Issues (14)
- Compile errors HOT 8
- dump_xsettings produces settings that xsettingsd can't parse HOT 1
- Cursor size in OpenBox HOT 1
- Release HOT 2
- Request for a GUI HOT 8
- How force Gtk/DecorationLayout "icon:minimize,maximize,close" to Gtk/DecorationLayout "menu" HOT 3
- New release? HOT 12
- Load settings from different config file HOT 2
- Changing font type/size? HOT 2
- 404 for https://developer.gnome.org/gtk/unstable/GtkSettings.html HOT 1
- opening apps slowly (Cannot transform xsetting) HOT 7
- locate, test and add more avilable xsettings as documentation HOT 7
- CharStreamTest.Basic test failure HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xsettingsd.