From Innocent Moth, 2 Years ago, written in Bash.
  1. #!/bin/bash
  2. CMD=$(
  3. echo "i3-nagbar
  4. -t warning -m 'Change keyboard?'
  5. -f 'pango:monospace 11'"
  6. for i in $(~/bin/keyswitch -L | awk -F: '{print $1}'); do
  7.         I=$(echo $i | tr a-z A-Z)
  8.         echo "-b '$I' '~/bin/keyswitch -k $i'"
  9. done
  10. )
  11. eval $CMD
captcha