<commit_before>#!/bin/bash - 
#===============================================================================
#
#          FILE: disable_keys.sh
# 
#         USAGE: ./disable_keys.sh 
# 
#   DESCRIPTION: 
# 
#       OPTIONS: ---
#  REQUIREMENTS: ---
#          BUGS: ---
#         NOTES: ---
#        AUTHOR: YOUR NAME (), 
#  ORGANIZATION: 
#       CREATED: 02/24/2015 02:28
#      REVISION:  ---
#===============================================================================

#set -o nounset                              # Treat unset variables as an error

# retrieves the id of a laptop internal keyboard
# remember you need fex !
get_k_id () {
  echo $(xinput -list | grep "AT Translated" | awk '{print $7}' | fex ' /id=/=-1')
}

status=-1;

if [ "${1}" == "enable" ]; then
  status=1
elif [ "${1}" == "disable" ]; then
  status=0
else
  echo "Operation not supported !"
  exit 1
fi

xinput set-prop $(get_k_id) 'Device Enabled' ${status}<commit_msg>logic to diable touchpad yay!<commit_after>#!/bin/bash -
#===============================================================================
#
#          FILE: disable_keys.sh
#
#         USAGE: ./disable_keys.sh
#
#   DESCRIPTION:
#
#       OPTIONS: ---
#  REQUIREMENTS: ---
#          BUGS: ---
#         NOTES: ---
#        AUTHOR: YOUR NAME (),
#  ORGANIZATION:
#       CREATED: 02/24/2015 02:28
#      REVISION:  ---
#===============================================================================

#set -o nounset                              # Treat unset variables as an error

# retrieves the id of a laptop internal keyboard
# remember you need fex !
get_k_id () {
  echo $(xinput -list | grep "AT Translated" | awk '{print $7}' | fex ' /id=/=-1')
}

get_m_id () {
  echo $(xinput -list | grep "PS/2" | awk '{print $6}' | fex ' /id=/=-1')
}

status=-1;

if [ "${1}" == "enable" ]; then
  status=1
elif [ "${1}" == "disable" ]; then
  status=0
else
  echo "Operation not supported !"
  exit 1
fi

xinput set-prop $(get_k_id) 'Device Enabled' ${status}
xinput set-prop $(get_m_id) 'Device Enabled' ${status}
{'fraction_non_alphanumeric': 0.2985507246376812, 'fraction_numerical': 0.02077294685990338, 'mean_word_length': 2.7248201438848922, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6396296', 'n_tokens_mistral': 726, 'n_tokens_neox': 651, 'n_words': 172}