#!/bin/bash

VAR=$(setxkbmap -query | grep layout | awk '{print toupper($2)}')_$(setxkbmap -query | grep variant | awk '{print $2}')

if [[ "${BLOCK_BUTTON}" -eq 1 ]]; then
	if [[ "$VAR" == "DE_neo" ]] ; then
		setxkbmap de
		echo "DE_"
	elif [[ "$VAR" == "DE_" ]] ; then
		setxkbmap us
		echo "US_"
		exit 0
	elif [[ "$VAR" == "US_" ]] ; then
		numlockx off
		setxkbmap de neo
		echo "DE_neo"
		exit 0
	fi
fi

echo $VAR
