I use LARBS as config for my system after fresh install of artix-runit. There is a remaps script in ~/.local/bin/ directory that has a bunch of keyboard related configurations in it:
#!/bin/sh
# This script is called on startup to remap keys.
# Decrease key repeat delay to 300ms and increase key repeat rate to 50 per second.
xset r rate 300 50
setxkbmap -option caps:swapescape
# Map the caps lock key to super, and map the menu key to right super.
setxkbmap -option altwin:menu_win
# When caps lock is pressed only once, treat it as escape.
killall xcape 2>/dev/null ; xcape -e 'Super_L=Escape'
# Turn off caps lock if on since there is no longer a key for it.
#xset -q | grep "Caps Lock:\s*on" && xdotool key Caps_Lock
and it's called from ~/.xprofile like this:
#!/bin/sh
# This file runs when a DM logs you into a graphical session.
# If you use startx/xinit like a Chad, this file will also be sourced.
xrandr --dpi 96 # Set DPI. User may want to use a larger number for larger screens.
setbg & # set the background with the `setbg` script
xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources & xrdbpid=$! # Uncomment to use Xresources colors/settings on startup
remaps & # run the remaps script, switching caps/esc and more; check it for more info
autostart="mpd xcompmgr dunst unclutter pipewire"
for program in $autostart; do
pidof -s "$program" || "$program" &
done >/dev/null 2>&1
# Ensure that xrdb has finished running before moving on to start the WM/DE.
[ -n "$xrdbpid" ] && wait "$xrdbpid"
My problem is, some times, not always, couple of hours after system startup, all keyboard configurations get deactivated (rate decrease, caps and escape are back to original keys etc.). and I have to open the terminal and run the remaps script manually to re-activate the keymaps.
Can somebody tell me where's the problem? Is there something wrong with my .xprofile?
I have systems running on arch linux and this problem never happened in any of them.