User Tools

Site Tools


en:linux:scripts:sl

/home/<username>/bin/sl

Script to manage keyboard layouts in X.

#!/bin/bash

if [ -z "$1" ]
then
	echo "You must specify a mode."
	exit 1
fi

case "$1" in
	"cz")
		setxkbmap -layout cz -variant qwerty
		;;
	"en" | "us")
		setxkbmap us -option ""
		;;
	"both")
		setxkbmap -layout us,cz -variant ,qwerty -option grp:lwin_toggle,grp:toggle
		;;
	"print")
		setxkbmap -v 10
		;;
	*)
		echo "Unknow mode '$1'."
		;;
esac
en/linux/scripts/sl.txt · Last modified: 2010/01/19 14:19 (external edit)