TIME1=240; TIME2=180; set -x; while [ "a" = "a" ]; do setxkbmap -layout dvorak -option ctrl:nocaps; sleep $(perl -e "print int rand shift" $TIME1); xmodmap ~/xmodap_for_custom_layout.txt; sleep $(perl -e "print int rand shift" $TIME2); done