]> git.friedersdorff.com Git - max/saltfiles.git/commitdiff
Add scripts to set keyboard layout
authorMaximilian Friedersdorff <max@friedersdorff.com>
Tue, 26 Jan 2021 09:30:33 +0000 (09:30 +0000)
committerMaximilian Friedersdorff <max@friedersdorff.com>
Tue, 26 Jan 2021 09:30:33 +0000 (09:30 +0000)
states/i3/files/layout-colemak_gb [new file with mode: 0644]
states/i3/files/layout-colemak_us [new file with mode: 0644]
states/i3/init.sls

diff --git a/states/i3/files/layout-colemak_gb b/states/i3/files/layout-colemak_gb
new file mode 100644 (file)
index 0000000..13d1064
--- /dev/null
@@ -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 (file)
index 0000000..9d5f982
--- /dev/null
@@ -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"
index 4f09c0f95318a160782ff2a4d03235856d453cc5..f97460efe266c4fdfc9b1619e781dbc516e75ace 100644 (file)
@@ -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