From 7e3d61b14f399004bcee66f3172bbdbdf0d3bd3d Mon Sep 17 00:00:00 2001 From: Von Random Date: Wed, 28 Jun 2017 15:09:17 +0300 Subject: [PATCH] a more universal approach to keyboard layout switching in mykblayouts --- mykblayouts | 13 +++++++++++++ mykblayouts-dist | 6 ------ 2 files changed, 13 insertions(+), 6 deletions(-) create mode 100755 mykblayouts delete mode 100755 mykblayouts-dist diff --git a/mykblayouts b/mykblayouts new file mode 100755 index 0000000..1dd4acf --- /dev/null +++ b/mykblayouts @@ -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 diff --git a/mykblayouts-dist b/mykblayouts-dist deleted file mode 100755 index efaa3c9..0000000 --- a/mykblayouts-dist +++ /dev/null @@ -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