From 77488771e5cc1bde1a918e3c4fac73ea1c8bfbc6 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Tue, 26 Jan 2021 09:30:33 +0000 Subject: [PATCH] Add scripts to set keyboard layout --- states/i3/files/layout-colemak_gb | 5 +++++ states/i3/files/layout-colemak_us | 5 +++++ states/i3/init.sls | 16 ++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 states/i3/files/layout-colemak_gb create mode 100644 states/i3/files/layout-colemak_us diff --git a/states/i3/files/layout-colemak_gb b/states/i3/files/layout-colemak_gb new file mode 100644 index 0000000..13d1064 --- /dev/null +++ b/states/i3/files/layout-colemak_gb @@ -0,0 +1,5 @@ +#!/bin/sh +setxkbmap -variant colemak gb +xmodmap -e "keycode 66 = Control_L Control_L Control_L Control_L" +xmodmap -e "keycode 135 = Control_R Control_R Control_R Control_R" +xmodmap -e "add Control = Control_L Control_R" diff --git a/states/i3/files/layout-colemak_us b/states/i3/files/layout-colemak_us new file mode 100644 index 0000000..9d5f982 --- /dev/null +++ b/states/i3/files/layout-colemak_us @@ -0,0 +1,5 @@ +#!/bin/sh +setxkbmap -variant colemak us +xmodmap -e "keycode 66 = Control_L Control_L Control_L Control_L" +xmodmap -e "keycode 135 = Control_R Control_R Control_R Control_R" +xmodmap -e "add Control = Control_L Control_R" diff --git a/states/i3/init.sls b/states/i3/init.sls index 4f09c0f..f97460e 100644 --- a/states/i3/init.sls +++ b/states/i3/init.sls @@ -37,3 +37,19 @@ conky launch script: - user: {{ grains['user'] }} - group: {{ grains['user'] }} - mode: 750 + +layout colemak gb: + file.managed: + - name: {{ grains['homedir'] }}/.local/bin/layout-colemak_gb + - source: salt://i3/files/layout-colemak_gb + - user: {{ grains['user'] }} + - group: {{ grains['user'] }} + - mode: 750 + +layout colemak us: + file.managed: + - name: {{ grains['homedir'] }}/.local/bin/layout-colemak_us + - source: salt://i3/files/layout-colemak_us + - user: {{ grains['user'] }} + - group: {{ grains['user'] }} + - mode: 750 -- 2.46.2