diff --git a/.local/scripts/touchpad.sh b/.local/scripts/touchpad.sh new file mode 100755 index 0000000..f9b3e3a --- /dev/null +++ b/.local/scripts/touchpad.sh @@ -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 diff --git a/post-laptop-install.sh b/post-laptop-install.sh new file mode 100644 index 0000000..1318c95 --- /dev/null +++ b/post-laptop-install.sh @@ -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