Mouse/cursor size?

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