#!/bin/bash
# cb-cowpowers - hacks for CrunchBang LiveCD sessions
# ---------------------------------------------------

    # Keyboard
    # ------------------------------------------------------------------
    # Set-up keyboard maps and systemtray switcher
    # tip - quickly toggle between keyboard maps by holding both shift keys!
    setxkbmap -option grp:switch,grp:ctrl_shift_toggle,grp_led:scroll us,ru,de,fr &
    (sleep 5s && sbxkb) &
while sleep 1s
do
if [[ "$(pidof sbxkb)" -lt "$(pidof tint2)" ]]; then
	(sleep 1s && killall sbxkb && sbxkb) &
	break
fi
done
    # ^^ note: if using the LiveCD, you can also change to a different
    #          keyboard map by entering the terminal command:
    #              setxkbmap xx
    #          Where "xx" is the 2 letter country code.
exit 0
