#!/bin/bash

NEW_COLS=80
NEW_LINES=30
NEW_KBD_LAYOUT=de

CUR_COLS=$( tput cols )
CUR_LINES=$( tput lines )

echo "Current terminal size is ${CUR_COLS} x ${CUR_LINES}."
if [ "${CUR_COLS}"x != "${NEW_COLS}"x -o "${CUR_LINES}"x != "${NEW_LINES}"x ] ; then
  echo "Setting the terminal to ${NEW_COLS} x ${NEW_LINES} ..."
  stty columns ${NEW_COLS} 
  stty rows ${NEW_LINES} 
fi

echo "Changing the keyboard layout to ${NEW_KBD_LAYOUT} ..."
loadkeys ${NEW_KBD_LAYOUT}

set -o emacs

