Monthly Archives: August 2011

GIT Repo in Bash Prompt OSX

Description: OSX Git Prompt – make your git repo prompts look pretty

Thief: Mark Evans:
Location: http://asemanfar.com/Current-Git-Branch-in-Bash-Prompt
c_cyan=`tput setaf 6`
c_red=`tput setaf 1`
c_green=`tput setaf 2`
c_sgr0=`tput sgr0`
parse_git_branch (){
    if git rev-parse --git-dir >/dev/null 2>&1
    then
        gitver=$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p')
    else
        return 0
    fi
    echo -e $gitver
}
branch_color (){
    if git rev-parse --git-dir >/dev/null 2>&1
    then
        color=""
    if git diff --quiet 2>/dev/null >&2 
    then
        color="${c_green}"
    else
        color=${c_red}
    fi
    else
        return 0
    fi
    echo -ne $color
}

#Branch First
#PS1='[\[$(branch_color)\]$(parse_git_branch)\[${c_sgr0}\]] \u@\[${c_red}\]\w\[${c_sgr0}\]: '
#Branch Last
PS1=' \u@\[${c_red}\]\w\[${c_sgr0}\]: [\[$(branch_color)\]$(parse_git_branch)\[${c_sgr0}\]]'<p class="more-link-p"> <a href="http://www.markalanevans.com/2011/08/16/git-repo-in-bash-prompt-osx/" class="more-link">Read more &rarr;</a></p>

OSX Lion Hates Developer

Two weeks ago I installed OSX Lion. I thought it would be great to try it out. Oddly I knew better. I thought about it the moment i clicked “install”…If only i could have gone back.

Preface

I code on a macbook pro.

The Hate Begins:

  • Missing spaces – I use spaces all the time it means i can move quickly from one space to the other. I use the grid 3×3 9 desktops nicely organized. But with Lion they replaced it with Mission Control. Which sucks, its slower, has less features(Moving apps from desktop to desktop is pain). I immediately disable auto arrangement of desktops. SLOW.
  • Desktops Auto Arrange – Mission Control thinks that its a good idea to to move apps around and desktops around based upon how often you use them. But thats not what I want because then i never know where the thing that I want to use it. SLOW. DISABLE. I simply unchecked the rearrranging based on recent use’ option in the Mission Control preferences.
  • Apache .local TLD delay BROKEN
  • Photoshop CS3 doesn’t work. BROKEN
  • Inverted mouse – are they completely oblivious? Why would i want to scroll my mouse wheel down to move the window up on my macbook… iPad=yes. computer=no. I realize there is an invert setting.. but it never should have been default. SLOW
  • Hidden Scroll bars: So i want to quickly scroll down or to the right.. i have to first scroll my wheel then grab the scroll bar indicator and drag it down. SLOW.