Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

For some reason, gitk always starts under all other apps.

How to make it start on top of all other apps, like a normal program?

Start it from the terminal with the gitk command, which lives in /usr/bin. There is no icon to click on...maybe need to create one?

Or is there a way to tell the OS to start it on top of all others? Perhaps with applescript?

Lion 10.7.5

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You will need to edit the gitk file.

To find the location of your gitk file type the following

which gitk

Open the gitk file in a text editor, near the top you should see a line like the following

exec wish "$0" -- "$@"

Edit the line so that it looks like this

exec wish "$0" -- "$@" & exec osascript -e "tell application \"Wish\" to activate"

The next time you invoke gitk from the terminal it will come to the foreground

Your question is similar to a question on stackoverflow, if you don't want to edit the gitk file you can find other ways to achieve it there http://stackoverflow.com/q/11248284/1873471

share|improve this answer
    
Awesome. It worked. Thank you. Didn't think to look on StackOverflow. Live n' learn. –  B Seven Dec 15 '12 at 1:22
    
This works, but sometimes throws an error 27:35: execution error: An error of type -10827 has occurred. (-10827) –  B Seven Dec 21 '12 at 22:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.