Skip to main content
Topic: Artix LXQT: Setting xmouse cursor size & xkeyboard (~/.Xmodmap) (Read 2806 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Artix LXQT: Setting xmouse cursor size & xkeyboard (~/.Xmodmap)

Hi,
I have a high-dpi display and the default xmouse cursor size of 18 is way to small for my display.
I couldn't find any GUI config option for the xmouse cursor size in LXQT (one of the Artix default desktop .iso).
A verified working ~/.Xmodmap will not be loaded from openbox/LXQT.
A in ~/.icons/ installed xcursor theme is visible in the 'Keyboard and Mouse' config applet and can be selected.
But does not work.
I found the developer priorities astonishing. Transparency and shadows are working, xcursor size and xkeyboard config are not.
Because I have no hope that the  xcursor and xkeyboard issues get fixed any time soon with this attitude, I worked out some workarounds for my problems. Maybe someone else find them useful.
Code: [Select]
#!/bin/bash
#
# Set some X11 configurations independent from Desktop and Windows Manager.
# By A.C.
# Needs the Arch/Artix package 'xorg-xwininfo' (Debian: x11-utils) for the X11 appearance check.
# Verify settings with: xrdb -query -all
# Script should be put in /usr/local/bin/configmyx11.sh and run by the Desktop Autorun.
# Probably: ~/.config/autostart/configmyx11.desktop
# [Desktop Entry]
# Type=Application
# Exec=/usr/local/bin/configmyx11.sh
# Hidden=false
# X-MATE-Autostart-enabled=true
# Name=ConfigMyX11
# Comment=Config X11 my way
#
# Set my favorite (downloaded) mouse-cursors
MYXCURSORTHEME=cz-Viator-Black-Hourglass
MYXCURSORPATH=~/.icons/cz-Viator-Black-Hourglass
# Or set the most common mouse-cursors
# MYXCURSORTHEME=Adwaita
# MYXCURSORPATH=/usr/share/icons/Adwaita
# Good xmouse cursor size for high-dpi displays
MYXCURSORSIZE=48
#
# Get sure we parse english output
LANG=C
LANGUAGE=
LC_CTYPE="C"
LC_NUMERIC="C"
LC_MESSAGES="C"
#
# Set my favorite TouchPad properties
/usr/bin/xinput set-prop 'SynPS/2 Synaptics TouchPad' 'libinput Tapping Enabled' 1 &
/usr/bin/xinput set-prop 'SynPS/2 Synaptics TouchPad' 'libinput Accel Speed' 0.5 &
/usr/bin/xinput set-prop 'SynPS/2 Synaptics TouchPad' 'libinput Tapping Drag Enabled' 0 &

# If Xcursor config file not exist, make it
if ! [ -s ~/.Xcursor ]; then
    touch ~/.Xcursor ; chown 1000:users ~/.Xcursor ; chmod 0644 ~/.Xcursor
    echo "Xcursor.size: $MYXCURSORSIZE" >~/.Xcursor
    echo "Xcursor.theme: $MYXCURSORTHEME" >>~/.Xcursor
    echo 'Xcursor.theme_core: true' >>~/.Xcursor
fi

# If Xkeybord config file not exist, make it
# Change the CAPS-LOCK key to a Shift left
if ! [ -s ~/.Xmodmap ]; then
    touch ~/.Xmodmap ; chown 1000:users ~/.Xmodmap ; chmod 0644 ~/.Xmodmap
    echo 'clear lock' >~/.Xmodmap
    echo 'clear shift' >>~/.Xmodmap
    echo 'keycode 66 = Shift_L' >>~/.Xmodmap
    echo 'add shift = Shift_L Shift_R' >>~/.Xmodmap
fi

/usr/bin/xrdb ~/.Xcursor &
/usr/bin/xsetroot -xcf $MYXCURSORPATH/cursors/left_ptr $MYXCURSORSIZE &
/usr/bin/xmodmap ~/.Xmodmap &
# Bug in LXQT: xcursor size only set correctly after lxqt-config-appearance is run.
/usr/bin/lxqt-config-appearance &
LXQTCAPID=$!
LXQTACTIV=0
QTO=0
while [ $QTO -lt 33 ]; do # 10 sec. timeout
    sleep 0.3 # Check every 300ms for appearance
    LXQTACTIV=$(/usr/bin/xwininfo -name 'LXQt Appearance Configuration' 2>&1 | grep -scie 'Map State: IsViewable')
    if [ $LXQTACTIV -gt 0 ]; then
        kill $LXQTCAPID 2>&1 >/dev/null
        break
    fi
    ((QTO++))
done