Skip to content

Instantly share code, notes, and snippets.

@Wabri
Created July 14, 2020 07:04
Show Gist options
  • Save Wabri/73f98d656b2715ca16a756bdb489e2fd to your computer and use it in GitHub Desktop.
Save Wabri/73f98d656b2715ca16a756bdb489e2fd to your computer and use it in GitHub Desktop.
Switch layout key from a keymap to another
#! /usr/bin/env bash
case "$(setxkbmap -v | awk -F '+' '/symbols/ {print $2}')" in
us)
setxkbmap it
;;
it)
setxkbmap us
;;
*)
echo 'Layout not recognize'
exit 2
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment