Fluxbox: Change languages / keyboard layout?
Under KDE, I had a nice little icon in the taskbar that I could click in order to change languages (from English to Russian). Is there an easy way to do this under fluxbox?
So far, I love fluxbox, but since I need to type in two languages, it's not incredibly useful yet. There's nothing I can find about this in either the faq or other documentation. Any ideas are appreciated, Baltika |
System apps like gKrellM have plugins such as xkb which allows you to switch between different keyboard maps, but you might not want all the functionality of gKrellM (worth looking at though!).
You may well find something on http://dockapps.org/ that will run in the corner of your fluxbox desktop and allow you do what you wish, but since I only need the one language I've never tried it. |
Using ~/.fluxbox/keys seems like an easy way to build something decent:
Code:
Mod4 k e :Exec setxkbmap $ENGLISH However, you probably need to switch X input method, which I don't know how to do (well, I do know how for uim/skk, but that's for japanese). わたし わ ひほんご お わからない ^_^ hth --Jonas |
Try use this little script
I create little script to fix problem for switching araound preffered keyboard layouts.
You can map in fluxbox keys file this script: Shift Control k :execcommand xkbSwitch 1) Copy this script into folder which you have in your $PATH. 2) Create hidden folder ~/.xkbSwitch 3) Create file ~/.xkbSwitch/xkb_layouts and write your preffered layouts (e.g us, de, sk, ...) into file, every layout at new line. After restart your fluxbox, you can use CTRL+SHIFT+k for araound changing your layouts or execute command xkbSwitch for it. xkbSwitch script: #!/bin/sh LAYOUTS_FILE=~/.xkbSwitch/xkb_layouts INDEX_FILE=~/.xkbSwitch/index if [ ! -r $LAYOUTS_FILE ]; then echo 'File $LAYOUTS does not exist!' exit 0 else if [ ! -r $INDEX_FILE ]; then echo '0' > $INDEX_FILE fi read line <$INDEX_FILE let "INDEX=$line+1" INNER_INDEX=0 while read line do LAYOUTS[$INNER_INDEX]=$line let "INNER_INDEX +=1" done <$LAYOUTS_FILE if [ $INDEX -ge $INNER_INDEX ]; then let "INDEX -=$INNER_INDEX" fi #echo ${LAYOUTS[$INDEX]} echo $INDEX >$INDEX_FILE setxkbmap -layout ${LAYOUTS[$INDEX]} fi #//// end of script I'm sorry, but spaces in script are not visible in this reply :( When you have any problems with script email me: komornik AT linux DOT sk I hope that I help you. |
All times are GMT -5. The time now is 05:06 AM. |