Add xinput alias stuff
This commit is contained in:
parent
1981d4b09c
commit
1094b14b5a
19
bash_aliases
19
bash_aliases
@ -121,3 +121,22 @@ function tpm2-contents() {
|
||||
sudo tmp2_pcrread
|
||||
sudo tpm2_pcrread
|
||||
}
|
||||
alias list-xinput-devices="xinput list"
|
||||
function disable-xinput-device() {
|
||||
if [ -z $1 ]; then
|
||||
echo "Provide a device name fragment.";
|
||||
else
|
||||
cdid=$(xinput list | grep "$1" | head -1 | grep -Po 'id=\K[^\t]*' | head -1);
|
||||
echo "Disabling: $cdid";
|
||||
xinput disable $cdid;
|
||||
fi;
|
||||
}
|
||||
function enable-xinput-device() {
|
||||
if [ -z $1 ]; then
|
||||
echo "Provide a device name fragment.";
|
||||
else
|
||||
cdid=$(xinput list | grep "$1" | head -1 | grep -Po 'id=\K[^\t]*' | head -1);
|
||||
echo "Enabling: $cdid";
|
||||
xinput enable $cdid;
|
||||
fi;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user