1
0
Fork 0
mirror of https://gitlab.com/mlunax/dotfiles.git synced 2025-04-18 16:26:50 +00:00

post-laptop-install and touchpad.sh

This commit is contained in:
Luna 2021-06-06 19:17:59 +02:00
parent a05961aba4
commit b99ddaa27e
2 changed files with 21 additions and 0 deletions

12
.local/scripts/touchpad.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
fileName=/tmp/touchpad
id=$(xinput | grep TouchPad |grep -Poh '(?<=id\=)[0-9]+')
if [[ ! -f $fileName ]]; then
echo "$id" > $fileName
xinput --disable $id
notify-send "Touchpad disabled" -t 1000 -u low
else
xinput --enable $(cat $fileName)
rm $fileName
notify-send "Touchpad enabled" -t 1000 -u low
fi

9
post-laptop-install.sh Normal file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
scripts_path_prefix="./.local/.scripts"
laptop_scripts=("touchpad.sh")
for i in ${laptop_scripts[@]}; do
path="$scripts_path_prefix/$i"
if [ -f $path ]; then
cp -iv $path $HOME/$path
fi
done