Skip to content

andrewskaggs/osx-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OS X Scripts

A collection of useful shell scripts for OS X. I found some and wrote some. All scripts are released under the GPLv2 unless it mentions otherwise in the comments.

git-completion.bash

Adds tab completion to git. Reference in your .profile:

source ~/osx-scripts/git-completion.bash

git-prompt.sh

Adds git status to the command line in git repo directories. Add a reference and configuration to your .profile: (see comments in scripts to change prompt)

source ~/osx-scripts/git-prompt.sh
PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "'
GIT_PS1_SHOWCOLORHINTS=true

screensaver.sh

Fixes a screensaver timeout policy that is too short. Set it to run in crontab, in this case every 4 minutes so a 5 minute policy does not run.

*/4 * * * * ~/osx-scripts/screensaver.sh

hg-prompt

  1. Clone hg-prompt from (https://bitbucket.org/sjl/hg-prompt/overview)
  2. Install hg-prompt in the .hgrc file
[extensions]
prompt = ~/bitbucket/hg-prompt/prompt.py
  1. Add hg-prompt to your .profile (example appends to prompt with git-prompt already installed)
hg_ps1() {
    hg prompt " [{branch} +{outgoing|count} -{incoming|count}{ {status}}] " 2> /dev/null
}
PROMPT_COMMAND='__git_ps1 "\u@\h:\w$(hg_ps1)" "\\\$ "'

About

useful shell scripts for Mac OS X

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages