From 223a55406ddf4e5325fd7ec2f250ef594751067c Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Fri, 14 Jan 2022 23:04:52 +0100 Subject: Update layouthandler with envar --- .local/bin/layouthandler | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to '.local') diff --git a/.local/bin/layouthandler b/.local/bin/layouthandler index 0bd8d33..3f8e74e 100755 --- a/.local/bin/layouthandler +++ b/.local/bin/layouthandler @@ -1,10 +1,14 @@ #!/bin/sh layout="$(setxkbmap -query | awk '$1 ~ /layout/ { print $2 }')" +alt_layout=${ALT_KB_LAYOUT?Alternative layout not set!} +echo "$alt_layout" case $layout in - en_US) - setxkbmap -layout se ;; - *) - setxkbmap -layout en_US +en_US) + setxkbmap -layout "$alt_layout" + ;; +*) + setxkbmap -layout en_US + ;; esac -- cgit v1.2.3-70-g09d2