* 'master' of https://github.com/hellerve/.dotfiles:
  removed all the update cruft
  added jsx to cloc
  added rainbarf to tmux
  remove autosetuprebase because catastrophe > value
This commit is contained in:
hellerve
2016-11-24 16:52:09 +01:00
4 changed files with 9 additions and 103 deletions

View File

@@ -3,3 +3,10 @@ zepto
filter remove_inline ;.*$
extension zp
3rd_gen_scale 1.25
JSX
filter remove_matches ^\s*//
filter call_regexp_common C
filter remove_inline //.*$
extension jsx
3rd_gen_scale 1.48
end_of_line_continuation \\$

View File

@@ -31,7 +31,6 @@
[branch]
autosetupmerge = always
autosetuprebase = always
[color]
branch = auto

View File

@@ -36,3 +36,5 @@ bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
# Bind ']' to use pbpaste
bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
set -g status-right '#(rainbarf --battery --remaining --no-bright)'

102
zshrc
View File

@@ -239,117 +239,15 @@ massif(){
}
upgrade () {
if [ ! $1 ] ; then
if [ `uname` = "Darwin" ]; then
osx_upgrade_local
elif [ `uname -o` = "GNU/Linux" ]; then
debian_upgrade_local
else
print "I don't know what can I do for this type of machine"
fi
elif [[ $1 = "help" || $1 = "--help" || $1 = "-h" ]] ; then
print "local usage for upgrading Mac OS X or debian systems including fink and darwin ports: upgrade and clean"
print 'remote usage: upgrade $debian_server'
elif [ $1 ]; then
if [[ `ssh $1 uname -o 2&>/dev/null` = "GNU/Linux" ]] ; then
debian_upgrade_remote $1
elif [[ `ssh $1 uname 2&>/dev/null` = "Darwin" ]] ; then
osx_upgrade_remote $1
else
print "$1 is not a debian nor an osx machine"
print "please implement an upgrade function for this kind of machine!"
fi
fi
}
osx_upgrade_local () {
if [ -x /usr/local/bin/brew ] ; then
brew update
brew upgrade --all
brew cleanup
fi
if [ -x /sw/bin/fink ] ; then
sudo fink selfupdate
sudo fink update-all
sudo fink cleanup
fi
if [ -x /opt/local/bin/port ] ; then
sudo port -d selfupdate
sudo port -ucRvpt upgrade installed
sudo port clean --all installed
if [ -x /opt/local/bin/gem ] ; then
sudo /opt/local/bin/gem update
fi
sudo port uninstall inactive
fi
if [ -d /Library/Application\ Support/TextMate/Bundles ]; then
pushd /Library/Application\ Support/TextMate/Bundles
svn up *.tmbundle
popd
osascript -e 'tell app "TextMate" to reload bundles'
fi
pupgrade
cupgrade
}
debian_upgrade_local (){
sudo apt-get update && sudo apt-get -u upgrade
sudo apt-get clean
pupgrade
cupgrade
}
osx_upgrade_remote (){
if [ ! $1 ]; then
print "usage: osx_upgrade_remote $osx_server"
print "Perhaps you want osx_upgrade_local ?"
else
local OSX_UP
local FINK_UP
local DARWINPORTS_UP
until [[ $OSX_UP == 'y' || $OSX_UP == 'n' ]]; do
print -n "Process osx upgrade on $1 (y/n)?"
read -q OSX_UP
done;
until [[ $FINK_UP == 'y' || $FINK_UP == 'n' ]]; do
print -n "Process fink upgrade on $1 (y/n)?"
read -q FINK_UP
done;
until [[ $DARWINPORTS_UP == 'y' || $DARWINPORTS_UP == 'n' ]]; do
print -n "Process darwinports upgrade on $1 (y/n)?"
read -q DARWINPORTS_UP
done;
if [[ $OSX_UP == "y" ]] ; then
fi
if [[ $FINK_UP == "y" ]] ; then
ssh $1 -t /usr/bin/sudo /sw/bin/fink selfupdate
ssh $1 -t /usr/bin/sudo /sw/bin/fink update-all
ssh $1 -t /usr/bin/sudo /sw/bin/fink cleanup
fi
if [[ $DARWINPORTS_UP == "y" ]] ; then
ssh $1 -t /usr/bin/sudo /opt/local/bin/port selfupdate
ssh $1 -t /usr/bin/sudo /opt/local/bin/port upgrade installed
ssh $1 -t /usr/bin/sudo /opt/local/bin/port clean --all installed
fi
fi
}
debian_upgrade_remote (){
if [ ! $1 ]; then
print "usage: debian_upgrade_remote $debian_server"
print "Perhaps you want debian_upgrade_local ?"
else
ssh $1 -t sudo apt-get update
ssh $1 -t "sudo apt-get -s upgrade"
local dummy
print -n "Process the upgrade y/n ?"
read -q dummy
if [[ $dummy == "y" ]] ; then
ssh $1 -t "sudo apt-get -u upgrade --yes && sudo apt-get clean"
fi
fi
}
function tree(){
find . | sed -e 's/[^\/]*\//|--/g' -e 's/-- |/ |/g' | $PAGER
}