Skip to content

Instantly share code, notes, and snippets.

View terrynguyen255's full-sized avatar

Terry Tu Nguyen terrynguyen255

  • HCMC
  • 12:12 (UTC +07:00)
View GitHub Profile
# Works best on my laptop DELL XPS 9570 - Ubuntu 18.04
#!/bin/bash
touchpad_id=$(xinput list | sed -nre '/Touchpad/s/.*id=([0-9]*).*/\1/p')
state=$( xinput list-props "$touchpad_id" | grep "Device Enabled" | grep -o "[01]$" )
if [ "$state" -eq '1' ];then
xinput --disable "$touchpad_id" && notify-send -i emblem-nowrite "Touchpad" "Disabled"
# How to add Git GUI to Ubuntu favorites
# Works best on my laptop DELL XPS 9570 - Ubuntu 18.04
git gui
# Then add below file as /usr/share/applications/gitgui.desktop
# [Desktop Entry]
# Type=Application
# Encoding=UTF-8
# Terminal=false