From b8cad9102fc1d42712364b48bcbff1998d429fbe Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Fri, 7 Jan 2022 15:30:44 +0100 Subject: Add script for switching kb layout --- .local/bin/layouthandler | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 .local/bin/layouthandler (limited to '.local/bin') diff --git a/.local/bin/layouthandler b/.local/bin/layouthandler new file mode 100755 index 0000000..c1e850a --- /dev/null +++ b/.local/bin/layouthandler @@ -0,0 +1,10 @@ +#!/bin/sh + +layout="$(setxkbmap -query | awk '$1 ~ /layout/ { print $2 }" + +case $layout in + en_US) + setxkbmap -layout se ;; + *) + setxkbmap -layout en_US +esac -- cgit v1.2.3-70-g09d2