[Unit]
Description=Capslock is escape
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'
[Install]
WantedBy=wm.target