3 changed files with 57 additions and 4 deletions
@ -0,0 +1,32 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
#Создан: Ср 07 окт 2020 15:24:22 |
||||||
|
#Изменён: Ср 07 окт 2020 16:34:00 |
||||||
|
|
||||||
|
switch_group() { |
||||||
|
setxkbmap -option "" |
||||||
|
setxkbmap -model pc104 -layout "$1" -variant "$2" |
||||||
|
setxkbmap -option -option terminate:ctrl_alt_bksp,caps:escape,grp:lwin_toggle,compose:ralt |
||||||
|
} |
||||||
|
|
||||||
|
current=$(setxkbmap -query | grep layout) |
||||||
|
|
||||||
|
if [[ "$current" =~ .*us.* ]]; then |
||||||
|
echo "EN/RU => GR/CO" |
||||||
|
switch_group el,co polytonic, |
||||||
|
else |
||||||
|
echo "GR/CO => EN/RU" |
||||||
|
switch_group us,ru ,, |
||||||
|
fi |
||||||
|
|
||||||
|
# Set default (us/gr) layout |
||||||
|
xkblayout-state set 0 |
||||||
|
|
||||||
|
date >> /home/maks/xkb.log |
||||||
|
|
||||||
|
echo `date` xbindkeys >> /home/maks/xkb.log |
||||||
|
xbindkeys -f "$SHELLRC/etc/X/xbindkeysrc.$(uname -i)" |
||||||
|
echo `date` xmodmap EXEC >> /home/maks/xkb.log |
||||||
|
xmodmap "$SHELLRC/etc/X/Xmodmaprc.$(uname -i)" |
||||||
|
echo `date` xmodmap DONE >> /home/maks/xkb.log |
||||||
|
|
Loading…
Reference in new issue