do not add `us' as secondary if already present

This commit is contained in:
Dario Gjorgjevski 2015-08-16 05:42:18 +02:00
parent 75c3b81654
commit 5f643320f3
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ local function worker (args)
idx = ((i - 1) % #layouts) + 1 -- Make sure to wrap around as needed.
local to_execute = 'setxkbmap ' .. layouts[idx].layout
if add_us_secondary then
if add_us_secondary and not string.match(layouts[idx].layout, ",?us,?") then
to_execute = to_execute .. ",us"
end