#!/usr/bin/env zsh

layouts='us(altgr-intl),ru(typewriter)'
(($#)) \
    && opts='grp:win_space_toggle,compose:menu' \
    || opts='grp:win_space_toggle,compose:menu,ctrl:nocaps'

# reset this before setting anything
setxkbmap us -option
setxkbmap $layouts -option $opts