david/myzsh
david
/
myzsh
Archived
1
0
Fork 0

pushzshconfig 14.09.2016 16:31

This commit is contained in:
david 2016-09-14 16:31:43 +02:00
parent c07142fcfd
commit 592ddc22ea
2 changed files with 151 additions and 0 deletions

View File

@ -16,6 +16,7 @@ alias dev="ssh -l david 10.9.0.43"
alias t="todo.sh"
alias vpn="sudo openvpn --writepid /var/run/openvpn --config /home/david/.vpn/david.conf"
alias aec="sshuttle -vvr 90.146.8.233 192.168.6.0/24 90.146.8.0/26 10.9.0.0/26 10.12.0.0/16 10.2.0.0/26 192.168.3.0/24 10.12.4.0/22"
alias home="sshuttle -vvr stargazer.socialnerds.org 10.1.2.0/24"
alias c="clear"
alias bat="acpi && date"
alias vn="vim ~/ownCloud/Notes/notes.md"

150
plugins/david.zsh~ Normal file
View File

@ -0,0 +1,150 @@
# Options
set -o shwordsplit
# Aliases
alias zz='source ~/.zshrc'
alias vz='vim ~/.zshrc && source ~/.zshrc'
alias vp='vim $ZSH/plugins/david.zsh && source ~/.zshrc'
alias vt='vim $ZSH/themes/david.zsh && source ~/.zshrc'
alias vi='vim'
alias vless="/usr/share/vim/vim73/macros/less.sh"
alias publish="python2 -m SimpleHTTPServer"
alias push="git push origin master"
alias pull="git pull origin master"
alias dev="ssh -l david 10.9.0.43"
alias t="todo.sh"
alias vpn="sudo openvpn --writepid /var/run/openvpn --config /home/david/.vpn/david.conf"
alias aec="sshuttle -vvr 90.146.8.233 192.168.6.0/24 90.146.8.0/26 10.9.0.0/26 10.12.0.0/16 10.2.0.0/26 192.168.3.0/24 10.12.4.0/22"
alias c="clear"
alias bat="acpi && date"
alias vn="vim ~/ownCloud/Notes/notes.md"
alias horizon="sshfs david@horizon.socialnerds.org:/ /home/david/horizon"
# Functions
pingscan()
{
nmap -sP $@ | grep "Nmap"
}
rdp()
{
if [ -z $1 ]; then
echo -e "server: \c"
read server
else
server=$1
fi
echo -e "username [davidadm]: \c"
read username
if [ -z $username ]; then
username="davidadm"
fi
echo -e "domain [aec.at]: \c"
read domain
if [ -z $domain ]; then
domain="aec.at"
fi
#rdesktop -u $username -p - -d $domain -g 1366x768 $server -k de
rdesktop -K -u $username -p - -d $domain -g workarea $server -k de
}
pullmyzsh()
{
cd $ZSH
git pull origin master
cd -
}
pushmyzsh()
{
cd $ZSH
git add **/*[^lastrun]
git commit -am "pushmyzsh $(date "+%d.%m.%Y %H:%M")"
git push origin master
cd -
}
update()
{
#checking for system
systems="ubuntu arch"
issue="$(cat /etc/issue)"
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 update && sudo apt-get dist-upgrade
;;
arch)
sudo pacman -Syu
;;
?)
echo "unknown system. could not run update."
;;
esac
}
install()
{
#checking for system
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
}
is_dirty()
{
local SUBMODULE_SYNTAX=''
if [[ $POST_1_7_2_GIT -gt 0 ]]; then
SUBMODULE_SYNTAX="--ignore-submodules=dirty"
fi
if [[ -n $(git status -s ${SUBMODULE_SYNTAX} 2> /dev/null) ]]; then
return 1
else
return 0
fi
}
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
}