From 69336f4aebe8fce9884dae2375eabc9948f43beb Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Fri, 28 Aug 2020 16:38:57 +0200 Subject: Added touchpad toggle --- .vimrc | 2 +- .xinitrc | 2 +- .zsh_aliases | 4 ++-- bin/touchpad-toggle | 9 +++++++++ install | 1 + xmonad.hs | 1 + 6 files changed, 15 insertions(+), 4 deletions(-) create mode 100755 bin/touchpad-toggle diff --git a/.vimrc b/.vimrc index 27f9bdd..76dd3e9 100644 --- a/.vimrc +++ b/.vimrc @@ -29,7 +29,7 @@ set wrapmargin=0 " disable auto line wrapping set encoding=utf-8 " utf-8 encoding set formatoptions-=t " do not auto break line > 89 character filetype plugin indent on " allow to add specific rules for certain type of file -set mouse=a " mouse scrolling (heretic) +" set mouse=a " mouse scrolling (heretic) " }}} " browse list with tab {{{ diff --git a/.xinitrc b/.xinitrc index abb4622..fd3a72a 100755 --- a/.xinitrc +++ b/.xinitrc @@ -1,4 +1,4 @@ -xinput disable 'ETPS/2 Elantech Touchpad' & +# xinput disable 'ETPS/2 Elantech Touchpad' & redshift -c /home/charles/.config/redshift.conf & dunst & exec xmonad diff --git a/.zsh_aliases b/.zsh_aliases index b2bd6ee..1410f07 100644 --- a/.zsh_aliases +++ b/.zsh_aliases @@ -10,8 +10,8 @@ alias valgrindc='colour-valgrind' # common commands alias less='less -N' # enable line number -alias v='nvim' -alias vim='nvim' +alias v='vim' +# alias vim='nvim' # alias mkdir='mkdir -p' alias gdb='gdb -q' # disable long intro message alias sudo='sudo ' # enable color (the search for aliases continues) diff --git a/bin/touchpad-toggle b/bin/touchpad-toggle new file mode 100755 index 0000000..f0a86a1 --- /dev/null +++ b/bin/touchpad-toggle @@ -0,0 +1,9 @@ +#!/bin/sh + +touchpad_name='ETPS/2 Elantech Touchpad' + +active="$(xinput list-props "$touchpad_name" | grep 'Device Enabled' | cut -f 3)" + +[ "$active" -eq 1 ] && + xinput disable "$touchpad_name" || + xinput enable "$touchpad_name" diff --git a/install b/install index 9106ed2..013b9bb 100755 --- a/install +++ b/install @@ -44,6 +44,7 @@ create_dotfile_link dunst/dunstrc .config/dunst/dunstrc mkdir -p "$HOME/.newsboat" create_dotfile_link_same .newsboat/config +#create_dotfile_link_same .newsboat/urls # create_dotfile_link_same slock/config.def.h diff --git a/xmonad.hs b/xmonad.hs index 9d05782..4b7ee10 100644 --- a/xmonad.hs +++ b/xmonad.hs @@ -39,6 +39,7 @@ myKeys = [ ("", spawn "~/bin/volume-ctl up") , ("", spawn "~/bin/backlight-ctl up") , ("", spawn "~/bin/backlight-ctl down") , ("", spawn "slock") + , ("", spawn "~/bin/touchpad-toggle") , ("M-o", spawn "~/bin/project-open") , ("M-m", spawn "st -e mocp") -- cgit