1
1
Fork 0

plugin update

This commit is contained in:
david 2019-11-17 18:02:13 +01:00
parent 8f79012165
commit d0dccb3559
1 changed files with 38 additions and 34 deletions

View File

@ -7,9 +7,8 @@ set -o shwordsplit
# **** aliases definitions ****
alias s='spotify'
alias zz='source $HOME/.zshrc'
alias zu='echo "LAST_EPOCH=0" > $ZSH_CACHE_DIR/.zsh-custom-update > $ZSH_CACHE_DIR/.zsh-update; source $HOME/.zshrc'
alias update_zsh=zu='echo "LAST_EPOCH=0" > $ZSH_CACHE_DIR/.zsh-custom-update > $ZSH_CACHE_DIR/.zsh-update; source $HOME/.zshrc'
alias vz='vim $HOME/.zshrc && source $HOME/.zshrc'
alias vp='vim $ZSH_CUSTOM/plugins/zsh-david/zsh-david.plugin.zsh && source $HOME/.zshrc'
alias vu='cd $ZSH_CUSTOM/plugins/zsh-david; git commit -am "plugin update" && git push origin master; cd -'
@ -120,38 +119,43 @@ update()
}
## Cross-platform install routine
install()
{
systems="ubuntu arch"
issue="$(cat /etc/issue)"
packages=$*
for item in $systems; do
echo $issue | grep -i $item >> /dev/null
if [ $? -eq 0 ]; then
system=$item
fi
done
case $system in
ubuntu)
sudo apt-get install -y $packages
;;
arch)
sudo pacman -Sy --noconfirm $packages
;;
?)
echo "unknown system. could not run install."
;;
esac
}
# **** old content which i keep here for reference ****
## Cross-platform install routine
#install()
#{
# systems="ubuntu arch"
# issue="$(cat /etc/issue)"
# packages=$*
# for item in $systems; do
# echo $issue | grep -i $item >> /dev/null
# if [ $? -eq 0 ]; then
# system=$item
# fi
# done
#
# case $system in
# ubuntu)
# sudo apt-get install -y $packages
# ;;
# arch)
# sudo pacman -Sy --noconfirm $packages
# ;;
# ?)
# echo "unknown system. could not run install."
# ;;
# esac
#}
## Thinkpad Trackpoint input fix (for for thinkpad x131e/chromebook)
fixtrackpoint()
{
xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 1
xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 2
xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 200
xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Axes" 6 7 4 5
xinput set-prop "TPPS/2 IBM TrackPoint" "Device Accel Constant Deceleration" 0.75
}
#fixtrackpoint()
#{
# xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 1
# xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 2
# xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 200
# xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Axes" 6 7 4 5
# xinput set-prop "TPPS/2 IBM TrackPoint" "Device Accel Constant Deceleration" 0.75
#}