From b1b33b20d2173ec63f090cccb27462ce4e0b587d Mon Sep 17 00:00:00 2001 From: Pig Monkey Date: Fri, 13 Apr 2018 21:43:28 -0700 Subject: [PATCH] support configurable middle click scoll button I'm using button 12, which on my Elecom HUGE trackball is labeled "Fn3". Existing users can set this variable to 2 if they wish to retain the previous behaviour. --- group_vars/all | 2 +- roles/x/tasks/main.yml | 4 ++-- roles/x/{files => templates}/30-scroll.conf | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename roles/x/{files => templates}/30-scroll.conf (71%) diff --git a/group_vars/all b/group_vars/all index e530ee8..4f2966b 100644 --- a/group_vars/all +++ b/group_vars/all @@ -207,7 +207,7 @@ himawaripy: run_on: trusted flags: --auto-offset --level 4 -middle_click_scroll: True +middle_click_scroll: 12 display_manager: lightdm gdm: diff --git a/roles/x/tasks/main.yml b/roles/x/tasks/main.yml index d33e765..5031157 100644 --- a/roles/x/tasks/main.yml +++ b/roles/x/tasks/main.yml @@ -30,8 +30,8 @@ - user - name: Enable middle-click scrolling - copy: src=30-scroll.conf dest=/etc/X11/xorg.conf.d/30-scroll.conf - when: middle_click_scroll is defined and middle_click_scroll == True + template: src=30-scroll.conf dest=/etc/X11/xorg.conf.d/30-scroll.conf + when: middle_click_scroll is defined - include: sxhkd.yml - include: unclutter.yml diff --git a/roles/x/files/30-scroll.conf b/roles/x/templates/30-scroll.conf similarity index 71% rename from roles/x/files/30-scroll.conf rename to roles/x/templates/30-scroll.conf index 1e39d0f..def7dd3 100644 --- a/roles/x/files/30-scroll.conf +++ b/roles/x/templates/30-scroll.conf @@ -2,5 +2,5 @@ Section "InputClass" Identifier "libinput middle click scroll" Driver "libinput" Option "ScrollMethod" "button" - Option "ScrollButton" "2" + Option "ScrollButton" "{{ middle_click_scroll }}" EndSection