KLM - Keyboard Layout Manager

Miscellaneous tools
Post Reply
Message
Author
postfs1

KLM - Keyboard Layout Manager

#1 Post by postfs1 »

Languages Image English and Russian.
Install_KLM--sr0.sh

Code: Select all

#!/bin/bash
#
# KLM = Keyboard Layout Manager
#
# # #
#
sed -i".tmp" '/"KLayout"/d' /root/Choices/ROX-Filer/PuppyPin ;
#
echo '[Desktop Entry]' > /usr/share/applications/KdLt.desktop ;
echo 'Encoding=UTF-8' >> /usr/share/applications/KdLt.desktop ;
echo 'Name=Keyboard Layout - US<>RU' >> /usr/share/applications/KdLt.desktop ;
echo 'Comment=The way of keyboard layout setup' >> /usr/share/applications/KdLt.desktop ;
echo "Exec=bash -c '\`Xdialog --title \"Change layout\" --no-tags --radiolist \"Keyboard layouts\" 13 31 10 \"rxvt -e setxkbmap -option grp:shifts_toggle,grp_led:scroll us,ru\" -=English=- on \"rxvt -e setxkbmap -option grp:shifts_toggle,grp_led:scroll ru,us\" -=Russian=- off 2>&1\` ; yaf-splash -text \`setxkbmap -print|grep xkb_symbols|cut -d+ -f2\`'" >> /usr/share/applications/KdLt.desktop ;
echo 'Terminal=false' >> /usr/share/applications/KdLt.desktop ;
echo 'Type=Application' >> /usr/share/applications/KdLt.desktop ;
echo 'Categories=X-DesktopCountry' >> /usr/share/applications/KdLt.desktop ;
echo 'GenericName=Keyboard Layout' >> /usr/share/applications/KdLt.desktop ;
echo 'Icon=/usr/share/pixmaps/xfdiff-icon.png' >> /usr/share/applications/KdLt.desktop ;
#ok...
sed -i".tmp" '/\/pinboard/d' /root/Choices/ROX-Filer/PuppyPin ;
sleep 1s ;
#echo '<icon x="928" y="128" label="KLayout">/usr/share/applications/KdLt.desktop</icon>' >> /root/Choices/ROX-Filer/PuppyPin ;
echo '<icon x="928" y="116" label="KLayout">/usr/share/applications/KdLt.desktop</icon>' >> /root/Choices/ROX-Filer/PuppyPin ;
echo '</pinboard>' >> /root/Choices/ROX-Filer/PuppyPin ;
sleep 1s ;
fixmenus ;
xmessage 'Icon for the -=Keyboard Layout=- has been created.' `jwm -display :0.0 -restart` ;
rox --pinboard=/root/Choices/ROX-Filer/PuppyPin ;

Edit: 2012, jun 27.
Permissions for -=Install_KLM--sr0.sh=- were changed as shown:

Code: Select all

cd /place_where_Install_KLM--sr0.sh_is_located ; chmod u+x Install_KLM--sr0.sh 
A script's content can be copied into text editor by means of <Quote> mode.

Addition:
An attempt to launch -=RXVT=- with needful font Image

Code: Select all

find / -name fonts.alias
cat /usr/X11R7/lib/X11/fonts/misc/fonts.alias
rxvt -fn lucidasanstypewriter-12

Post Reply