Recently Written · git

xinput-persistence

xinput for mouse or keyboard configurations that work when disconnected or on boot.

git clone https://github.com/equwal/xinput-persistence

Log | Files | Refs


commit 4a0fd88a443d9b3baeda31f564b96d457b706183
Spenser Truex <spensertruexonline@gmail.com>
2019-04-22 15:48:41 -0700

Add install script.

 README.org    | 8 +++++---
 commands.conf | 3 ++-
 install.sh    | 3 +++
 3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/README.org b/README.org
index ee702eb..f99f5e3 100644
--- a/README.org
+++ b/README.org
@@ -43,10 +43,12 @@ Perl will insert the ID of the xinput device if -c2 is specified, and it will be
 placed between the c1 and c2 commands. Commands that do not need the xinput id
 can omit -c2.
 
+Finally, install it
+#+BEGIN_SRC
+xinput-persistence # ./install.sh
+#+END_SRC
 You can have as many devices as required, just add a new monitor.pl command to the file. 
 
 The program will fork each one.
 
-Make sure to add =forking.pl= to your startup scripts. Also, note that this is a
-BRAND NEW REPO, and there are bugs. For example, in order to run forking.pl, you
-must first =cd= to the directory it is in!
+Make sure to add =/usr/bin/monitor= to your startup scripts.
diff --git a/commands.conf b/commands.conf
index fac9d91..b5ba875 100644
--- a/commands.conf
+++ b/commands.conf
@@ -1,2 +1,3 @@
-monitor.pl -a 'add' -n 'DeathAdder Elite' -d 'usb' -c1 'xinput set-prop ' -c2 ' 153 0.114285, 0.000000, 0.000000, 0.000000, 0.114285, 0.000000, 0.000000, 0.000000, 1.000000'
+monitor.pl -a 'add' -n 'DeathAdder Elite' -d 'usb' -c1 'xinput set-prop ' -c2 ' 153 0.114285, 0.000000, 0.000000, 0.000000, 0.114285, 0.000000, 0.000000, 0.000000, 1.000000 && xinput --disable "ETPS/2 Elantech Touchpad"'
 monitor.pl -a 'add' -n 'Rosewell' -d 'usb' -c1 '/usr/bin/desired-keymap'
+monitor.pl -a 'remove' -n 'DeathAdder Elite' -d 'usb' -c1 'xinput --enable "ETPS/2 Elantech Touchpad"'
diff --git a/install.sh b/install.sh
new file mode 100755
index 0000000..b67725d
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+cp monitor.pl /usr/bin/monitor.pl
+cp forking.pl /usr/bin/monitor