a more universal approach to keyboard layout switching in mykblayouts

This commit is contained in:
Von Random 2017-06-28 15:09:17 +03:00
parent 7e7087c8bb
commit 7e3d61b14f
2 changed files with 13 additions and 6 deletions

13
mykblayouts Executable file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env zsh
# reset this before setting anything
setxkbmap us -option
if $(lsusb -d '04d9:0125' > /dev/null); then
layouts='us(altgr-intl),ru(typewriter)'
else
layouts='ducky_mini(us),ducky_mini(ru)'
fi
opts='grp:win_space_toggle,compose:menu'
setxkbmap $layouts -option $opts

View file

@ -1,6 +0,0 @@
#!/usr/bin/env zsh
layouts='us,ru'
variants='altgr-intl,typewriter'
opts='ctrl:nocaps,grp:win_space_toggle,compose:menu'
setxkbmap -layout $layouts -variant $variants -option $opts