I was thinking about writing a script that toggles my desktop between regular use and screencasting mode. As part of that I would like to be able to programmatically set the my cursor to a different theme (bigger and higher visibility).
Is there any way I can do this from bash/python?
Edit:
I would prefer to be able to set this without having to change the systemwide X.org configuration (just like KDE's systemsettings does). Looking into this a bit myself I found that you can actually update the corresponding KDE config file through kwriteconfig5
:
kwriteconfig5 --file ~/.config/kcminputrc --group Mouse --key cursorTheme "Large Mouse Cursors"
The only problem is that the setting does not seem to be applied. The config file does update, but not the cursor. So there probably must be some kind of command that will cause KDE to reload the file and apply the new cursor theme (maybe something through dbus
?). Sadly I haven't had any success in tracking that down, yet.
After some searching, I found out a few things that you may be able to do. Note that the following solutions only works under X11, I have no idea how to make it work with Wayland.
sudo update-alternatives --config x-cursor-theme
as a bash command, and then restart your computer/KWin and plasma shell (original answer for Gnome: https://askubuntu.com/a/73736/661239)I don't have enough reputation to add a comment. So I'll just put this here.
You didn't mention this on your post. Have you try to refresh the shell after you change the config?