From 427f80005163d9a73b62a2e8de18db76934ec408 Mon Sep 17 00:00:00 2001 From: ObeseTermite Date: Thu, 13 Jun 2024 06:39:06 -0700 Subject: [PATCH] Initial commit testing, not all config files yet --- .bashrc | 11 +++++++++++ .xinitrc | 3 +++ bin/touchpad | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 .bashrc create mode 100644 .xinitrc create mode 100755 bin/touchpad diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..3d7c9ce --- /dev/null +++ b/.bashrc @@ -0,0 +1,11 @@ +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +alias ls='ls --color=auto' +alias grep='grep --color=auto' + +export PATH=$PATH:~/bin diff --git a/.xinitrc b/.xinitrc new file mode 100644 index 0000000..d178bd4 --- /dev/null +++ b/.xinitrc @@ -0,0 +1,3 @@ +setxkbmap -layout us,ru -variant ,phonetic -option grp:win_space_toggle & +bash touchpad disable & +exec i3 diff --git a/bin/touchpad b/bin/touchpad new file mode 100755 index 0000000..fb61182 --- /dev/null +++ b/bin/touchpad @@ -0,0 +1,35 @@ +#!/bin/bash + +xinput_touchpad_id=$(xinput | grep -i touchpad | sed 's/^.*id=\([0-9]*\).*/\1/') + +case $1 in + + enable) + xinput enable $xinput_touchpad_id + ;; + disable) + xinput disable $xinput_touchpad_id + ;; + id) + echo $xinput_touchpad_id + ;; + --help | -h) + echo 'Usage: touchpad OPTION' + echo 'Used to manipulate touchpad.' + + echo '' + echo ' --help: display this help and exit' + echo ' enable: enables touchpad' + echo ' disable: disables touchpad' + echo ' id: returns the xinput id of the touchpad' + ;; + "") + echo 'No argument provided.' + echo 'Try "touchpad --help" for more information.' + ;; + *) + echo 'Invalid argument.' + echo 'Try "touchpad --help" for more information' + ;; +esac +