Remap keys using setxkbmap

TL;DR

Put this in your ~/.xsession:

setxkbmap -option caps:escape,lv3:ralt_alt

Reset with:

setxkbmap -option

Caps Lock

A pointless key, it’s better to have it be Escape instead:

setxkbmap -option caps:escape

AltGr

Repurpose it to Alt so you can switch workspaces with one hand:

setxkbmap -option lv3:ralt_alt

Documentation

There is none, you can look at these options listed here:

cat /usr/share/X11/xkb/rules/base.lst

Stare at them for a few hours, try some out, and you might stumble upon something useful.