From a3d499a972e9068c09829550d1cf804bd649dea6 Mon Sep 17 00:00:00 2001 From: John Shuping Date: Tue, 13 Oct 2015 22:31:51 -0400 Subject: [PATCH 1/2] clarify 'as root' --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 570f2cd..ef553fa 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ should be available at the path specified in the `ssh.user_key` variable. Run the playbook as root. - $ ansible-playbook -i localhost playbook.yml + # ansible-playbook -i localhost playbook.yml When run, Ansible will prompt for the user password. This only needs to be provided on the first run when the user is being created. On later runs, From 06e8e2c1a218a6921c157079e4921631c1827cab Mon Sep 17 00:00:00 2001 From: John Shuping Date: Wed, 14 Oct 2015 22:10:02 -0400 Subject: [PATCH 2/2] initial macbook support - create macbook role - move xf86-input-synaptics to thinkpad role - macbook role uses xf86-input-mtrack-git - i'm curious if mtrack-git works better than synaptics on thinkpad --- roles/laptop/tasks/main.yml | 1 - roles/macbook/files/50-mtrack-git.conf | 21 +++++++++++++++++++ roles/macbook/meta/main.yml | 4 ++++ roles/macbook/tasks/main.yml | 2 ++ roles/macbook/tasks/mtrack-git.yml | 20 ++++++++++++++++++ .../files/50-synaptics.conf | 0 roles/thinkpad/tasks/main.yml | 1 + .../{laptop => thinkpad}/tasks/synaptics.yml | 0 8 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 roles/macbook/files/50-mtrack-git.conf create mode 100644 roles/macbook/meta/main.yml create mode 100644 roles/macbook/tasks/main.yml create mode 100644 roles/macbook/tasks/mtrack-git.yml rename roles/{laptop => thinkpad}/files/50-synaptics.conf (100%) rename roles/{laptop => thinkpad}/tasks/synaptics.yml (100%) diff --git a/roles/laptop/tasks/main.yml b/roles/laptop/tasks/main.yml index 66f3e96..40bfb26 100644 --- a/roles/laptop/tasks/main.yml +++ b/roles/laptop/tasks/main.yml @@ -1,5 +1,4 @@ --- -- include: synaptics.yml - include: tlp.yml - name: Copy logind configuration file diff --git a/roles/macbook/files/50-mtrack-git.conf b/roles/macbook/files/50-mtrack-git.conf new file mode 100644 index 0000000..507c608 --- /dev/null +++ b/roles/macbook/files/50-mtrack-git.conf @@ -0,0 +1,21 @@ +Section "InputClass" + MatchIsTouchpad "on" + Identifier "Touchpads" + Driver "mtrack" + Option "Sensitivity" "0.65" + Option "IgnoreThumb" "true" + Option "IgnorePalm" "true" + Option "TapButton1" "1" + Option "TapButton2" "3" + Option "TapButton3" "2" + Option "ClickFinger1" "1" + Option "ClickFinger2" "3" + Option "ClickFinger3" "2" + Option "BottomEdge" "25" +# natural scrolling + Option "ScrollDownButton" "4" + Option "ScrollUpButton" "5" + Option "ScrollLeftButton" "7" + Option "ScrollRightButton" "6" +EndSection + diff --git a/roles/macbook/meta/main.yml b/roles/macbook/meta/main.yml new file mode 100644 index 0000000..23f13e4 --- /dev/null +++ b/roles/macbook/meta/main.yml @@ -0,0 +1,4 @@ +--- +dependencies: + - { role: base } + - { role: laptop } diff --git a/roles/macbook/tasks/main.yml b/roles/macbook/tasks/main.yml new file mode 100644 index 0000000..7f0e62a --- /dev/null +++ b/roles/macbook/tasks/main.yml @@ -0,0 +1,2 @@ +--- +- include: mtrack-git.yml diff --git a/roles/macbook/tasks/mtrack-git.yml b/roles/macbook/tasks/mtrack-git.yml new file mode 100644 index 0000000..c68f7fe --- /dev/null +++ b/roles/macbook/tasks/mtrack-git.yml @@ -0,0 +1,20 @@ +--- +- name: Copy mtrack-git configuration file + copy: src=50-mtrack-git.conf dest=/etc/X11/xorg.conf.d/50-mtrack-git.conf + +- name: Download xf86-input-mtrack-git + command: cower -dq xf86-input-mtrack-git + chdir=/home/{{ user.name }}/{{ aur.dir }} + creates=/home/{{ user.name }}/{{ aur.dir }}/xf86-input-mtrack-git + tags: + - aur + become: yes + become_user: "{{ user.name }}" + +- name: Build and install mtrack-git + command: "{{ aur.makepkg }} chdir=/home/{{ user.name }}/{{ aur.dir }}/xf86-input-mtrack-git" + tags: + - aur + become: yes + become_user: "{{ user.name }}" + diff --git a/roles/laptop/files/50-synaptics.conf b/roles/thinkpad/files/50-synaptics.conf similarity index 100% rename from roles/laptop/files/50-synaptics.conf rename to roles/thinkpad/files/50-synaptics.conf diff --git a/roles/thinkpad/tasks/main.yml b/roles/thinkpad/tasks/main.yml index 8561fca..10f21b5 100644 --- a/roles/thinkpad/tasks/main.yml +++ b/roles/thinkpad/tasks/main.yml @@ -1,3 +1,4 @@ --- +- include: synaptics.yml - include: battery.yml #- include: fan.yml diff --git a/roles/laptop/tasks/synaptics.yml b/roles/thinkpad/tasks/synaptics.yml similarity index 100% rename from roles/laptop/tasks/synaptics.yml rename to roles/thinkpad/tasks/synaptics.yml