summaryrefslogtreecommitdiff
path: root/chaos-at-home
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-12-30 19:13:04 +0100
committerChristian Pointner <equinox@spreadspace.org>2020-12-30 19:13:04 +0100
commita69ff5ee98160b2534a867845ca1f1bfe2fefab9 (patch)
treed3e7abbd185313fe74f8b1af29dfb63d48e1029b /chaos-at-home
parentws/minet: add even more connection scripts (diff)
ch-equinox-t450s: some finishing touches
Diffstat (limited to 'chaos-at-home')
-rw-r--r--chaos-at-home/ch-equinox-t450s.yml45
-rw-r--r--chaos-at-home/ch-equinox-ws.yml6
-rw-r--r--chaos-at-home/host_vars/ch-equinox-t450s.yml12
3 files changed, 63 insertions, 0 deletions
diff --git a/chaos-at-home/ch-equinox-t450s.yml b/chaos-at-home/ch-equinox-t450s.yml
index e60d47a9..a63798f4 100644
--- a/chaos-at-home/ch-equinox-t450s.yml
+++ b/chaos-at-home/ch-equinox-t450s.yml
@@ -20,3 +20,48 @@
- name: install ansible via pip
pip:
name: ansible
+
+ - name: disable caps-lock
+ lineinfile:
+ path: /etc/default/keyboard
+ regexp: '#?\s*XKBOPTIONS='
+ line: 'XKBOPTIONS="caps:none"'
+
+ ## TODO install autostart and keyboard shortcut Ctrl+P
+ - name: install touchpad control script
+ copy:
+ dest: /usr/local/bin/touchpadctl
+ mode: 0755
+ content: |
+ #!/bin/bash
+
+ ID=$(xinput list | grep "SynPS/2 Synaptics TouchPad" | sed 's/^.*id=\([0-9]*\).*$/\1/')
+ if [ -z "$ID" ]; then
+ ID=$(xinput list | grep "Synaptics TM3053-004" | sed 's/^.*id=\([0-9]*\).*$/\1/')
+ fi
+
+ if [ -z "$ID" ]; then
+ echo "cannot find device!"
+ exit 1
+ fi
+
+ if [ -n "ID" ]; then
+ case $1 in
+ enable|disable)
+ xinput $1 $ID
+ ;;
+ toggle)
+ CURRENT_STATE=$(xinput list-props $ID | grep 'Device Enabled' | awk 'BEGIN { FS = ":" } ; { print $2 }' | sed 's/^.*\([01]\).*$/\1/')
+ if [ $CURRENT_STATE -ne 1 ]; then
+ xinput enable $ID
+ else
+ xinput disable $ID
+ fi
+ ;;
+ *)
+ echo "usage: $0 (enable|disable|toggle)"
+ ;;
+ esac
+ else
+ echo "Touchpad not found..."
+ fi
diff --git a/chaos-at-home/ch-equinox-ws.yml b/chaos-at-home/ch-equinox-ws.yml
index 2118d4a0..59f15e2f 100644
--- a/chaos-at-home/ch-equinox-ws.yml
+++ b/chaos-at-home/ch-equinox-ws.yml
@@ -18,3 +18,9 @@
- name: install ansible via pip
pip:
name: ansible
+
+ - name: disable caps-lock
+ lineinfile:
+ path: /etc/default/keyboard
+ regexp: '#?\s*XKBOPTIONS='
+ line: 'XKBOPTIONS="caps:none"'
diff --git a/chaos-at-home/host_vars/ch-equinox-t450s.yml b/chaos-at-home/host_vars/ch-equinox-t450s.yml
new file mode 100644
index 00000000..2ff5f220
--- /dev/null
+++ b/chaos-at-home/host_vars/ch-equinox-t450s.yml
@@ -0,0 +1,12 @@
+$ANSIBLE_VAULT;1.2;AES256;chaos-at-home
+61623439663238613565373161373630393231373134656534393832396137336165393831366332
+6331623365633365353134393933363566326435303430350a393230663737356532363032666230
+31343730313963666162316266313237616437303139333631303830383565333538303262383539
+3537326362326262370a336464383465663263646565316364343839346664316465623162323732
+37656561353534346631613435643631376431393963336232643030343133366635666161343430
+35666631386161646265333936313335376439613566656634613962363532653438303532616636
+64373535616538326230356130633739353630383432636466366461333439626531303938343062
+37336532663730646436343364343536373264626330323831326639636533663434376133343934
+37613330383639386565343365353335386363363563376563356632633733653665386435343064
+65316264643730626338343432646434363638343630333563663535623434653930326534643233
+356430333064616132353837323063336461