Browse code

Add dotfiles

Robert Cranston authored on 12/02/2022 13:25:39
Showing 4 changed files

1 1
new file mode 100755
... ...
@@ -0,0 +1,9 @@
1
+#!/bin/sh
2
+set -euC
3
+
4
+name() {
5
+  xinput list --name-only | grep -i "$1" | grep -vi 'virtual'
6
+}
7
+
8
+xinput float "$(name keyboard)"
9
+xinput float "$(name touchpad)"
0 10
new file mode 100644
... ...
@@ -0,0 +1,7 @@
1
+echo "$TERM" | grep -q '^linux\(-\|$\)' || return 0
2
+
3
+# `XKBOPTIONS` from `$HOME/.keyboard`.
4
+# setupcon --keyboard-only
5
+
6
+# Typematic delay and rate.
7
+# sudo kbdrate -d 200 -r 30
0 8
new file mode 100644
... ...
@@ -0,0 +1,15 @@
1
+# `XKBOPTIONS` from `$HOME/.keyboard`.
2
+. "$HOME/.keyboard"
3
+setxkbmap -model   "$XKBMODEL"
4
+setxkbmap -layout  "$XKBLAYOUT"
5
+setxkbmap -variant "$XKBVARIANT"
6
+setxkbmap -option
7
+printf '%s\n' "$XKBOPTIONS" \
8
+| tr ',' '\n' \
9
+| while read -r xkboption
10
+do
11
+  setxkbmap -option "$xkboption"
12
+done
13
+
14
+# Typematic delay and rate.
15
+xset r rate 200 30
0 16
new file mode 100644
... ...
@@ -0,0 +1,15 @@
1
+# `xserver-xorg-input-libinput` (default)
2
+if [ "$(command -v xinput)" ]
3
+then
4
+  for id in $(xinput list --id-only)
5
+  do
6
+    xinput set-prop "$id" 'libinput Tapping Enabled' 1
7
+    xinput set-prop "$id" 'libinput Disable While Typing Enabled' 0
8
+  done 2> '/dev/null'
9
+fi
10
+
11
+# `xserver-xorg-input-synaptics` (legacy)
12
+if [ "$(command -v synclient)" ]
13
+then
14
+  synclient tapbutton1=1
15
+fi