You are not logged in.
Hi all,
I am Greek so I have to switch keyboard layouts every now and then (with alt+shift). This is the
corresponding xorg lines:
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us,gr"
Option "XkbVariant" ","
Option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll"
EndSection
Now, I am using the dwm window manager and using xsetroot to display info in my status bar.
I would really like to display the current layout.
So, I was wondering, is there some command/variable/whatever one could use in a script or in the command
line that shows the current layout? (in my case "US" or "GR")? I could use that in conky too..
Thanks a lot in advance..
Offline
that's awful:
echo `setxkbmap -print | grep xkb_symbols | awk '{print $4}' | awk -F"+" '{print $2}'`
Offline
that's awful:
echo `setxkbmap -print | grep xkb_symbols | awk '{print $4}' | awk -F"+" '{print $2}'`
Hey,
thanks a lot for the reply. Though this doesn't work...
I'm not sure if I made clear what I want though, the output of "setxkbmap -print" does not
change when I switch layouts. What I would like is something that outputs "us" when my keyboard
is set to English and "gr" when it is set to Greek..
Thanks again
Offline