Eu gostei segue (modificado para suas necessidades):
#!/usr/bin/env bash
#
killall kbdd 2>/dev/null
kbdd >/dev/null || exit 1
# Get initial state of layout
N=$( dbus-send --print-reply=literal --dest=ru.gentoo.KbddService\
/ru/gentoo/KbddService ru.gentoo.kbdd.getCurrentLayout 2>/dev/null |\
sed -un 's/^.*uint32 //p' )
# In case dbus service wasn't available yet, poll until service is ready
while [[ -z "$N" ]]; do
sleep .1
N=$( dbus-send --print-reply=literal --dest=ru.gentoo.KbddService\
/ru/gentoo/KbddService ru.gentoo.kbdd.getCurrentLayout 2>/dev/null |\
sed -un 's/^.*uint32 //p' )
done
dbus-send --print-reply=literal --dest=ru.gentoo.KbddService \
/ru/gentoo/KbddService ru.gentoo.kbdd.getLayoutName uint32:$N |\
sed -un 's:.*English.*:EN(US):p;s:.*German.*:DE:p'
# Parse dbus output
dbus-monitor "interface='ru.gentoo.kbdd',member='layoutNameChanged'" |\
sed -un 's:.*English.*:EN(US):p;s:.*German.*:DE:p'
Lembre-se de ajustar o script de acordo, no caso de alterar os layouts.