Mouse/cursor size?

You can easily change the mouse theme by invoking lxappearance or through Mabox Control Center (which points to lxappeareance too). Yet, the option to change the pointer size is missing in the dialog. Not sure how difficult could be to include this feature in future versions of Mabox.

Currently a workaround is edit the ~/.Xresources file and (at the bottom) adding the line:

Xcursor.size: 32

Values 48 and 64 are valid too according to your needs.

Similarly, Firefox is ignoring whatever mouse theme you choose and the pointer changes into another one when hovering the mouse inside it. The only solution so far is editing ~/.config/gtk-3.0/settings.ini file and commenting the gtk-cursor-theme-name line, ie, like this:

#gtk-cursor-theme-name=oreo_spark_orange_cursors

I was wondering if this can be fixed “under the hood” after the installation of Mabox.

Regards.

3 Likes

Thanks for this tip @M0nst3r,
and welcome to the forum :slight_smile:

I wonder if there is a way to immediately apply this change to all applications …
xrdb ~ / .Xresources
works, but only for newly launched windows.

Anyway, I think I’ll be using the big cursor to record Mabox videos.

Not sure really, I rebooted the computer after those two changes and worked immediately for both the size and Firefox issue.

I’m trying to test and understand how it works…
…and maybe find the best way to handle it

LXappearance writes to:
~/.config/gtk-3.0/settings.ini
and
~/.icons/default/index.theme
Update and also:
~/.gtkrc-2.0

ArchWiki: Cursor themes - ArchWiki

From my short tests, it seems that only Firefox is affected by changes made by LXAppearance - checked after logout :thinking:

I investigated this more and it is more complicated.

Anyway I wrote a lxappearance wrapper to workaround its weired behaviuor.

Works very well from my tests and it will be included in new Mabox.
It does not touch cursor size, but help with cursor theme changes.
I will try to deal with cursor sizes later.

You can try it if you want…
this script goes to ~/.local/bin/lxappearance

#!/bin/bash
GTK2_RC="$HOME/.gtkrc-2.0"
GTK3_RC="$HOME/.config/gtk-3.0/settings.ini"
ICON_DEF="$HOME/.icons/default/index.theme"
XRES="$HOME/.Xresources"

/usr/bin/lxappearance

sleep .5
#READ Cursor theme name from GTK2_RC 
read CURTHEME <<< "$(grep gtk-cursor-theme-name ${GTK2_RC} | cut -d'"' -f2)"
# WRITE to GTK3
if grep "^gtk-cursor-theme-name=${CURTHEME}" ${GTK3_RC};then
#found
    :
else
    sd "^gtk-cursor-theme-name.*$" "gtk-cursor-theme-name=${CURTHEME}" ${GTK3_RC}
fi

# WRITE to ICON_DEF
if grep "^Inherits=${CURTHEME}" ${ICON_DEF};then
    :
else
    sd "^Inherits=.*$" "Inherits=${CURTHEME}" ${ICON_DEF}
fi
# WRITE to .Xresources
if grep "^Xcursor.theme: ${CURTHEME}" ${XRES};then
    :
else
    if grep Xcursor.theme ${XRES};then
        sd "^Xcursor.theme:.*$" "Xcursor.theme: ${CURTHEME}" ${XRES}
    else
        echo "Xcursor.theme: ${CURTHEME}" >> ${XRES}
    fi
    xrdb "$HOME/.Xresources"
fi
1 Like

Great.

You could make your solution a bit more elegant replacing:

grep gtk-cursor-theme-name ${GTK2_RC} | cut -d'"' -f2

With just:

grep -oP 'gtk-cursor-theme-name="\K[^"]+' ${GTK2_RC}

:sunglasses: