You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
815 B
32 lines
815 B
#!/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 |
|
|
|
|