Categories
Archived Mac & OS X Uncategorized

Pimp My Desktop using GeekTool

Continuing with the theme of pimping various aspects of the OS X system configuration, today’s article covers how to use GeekTool 3 to display useful info on your OS X desktop.  For those that missed it, one of my recent articles, "Pimp My Prompt … like Paul Irish covered using the .bash_profile script to add some geek bling to your bash prompt – check it out.

The idea of GeekTool is to use the often under-utilised desktop area of OS X to display useful info.  Some people use it to display images but most use it to run Bash shell commands to interrogate and display various system-level statistics.  For example, my desktop looks like this (click for larger version):

My GeekTool Desktop
My GeekTool Desktop

Before you ask, the desktop background is an InterfaceLift image called The Solutionist.  🙂

Now, I’m going to assume that you’ve already downloaded and installed GeekTool 3 from the GeekTool homepage.  If you haven’t done that already, do it now, please.

Once you’ve got it installed, open System Preferences and click the GeekTool preference pane that should now be available.  For this article, please drag a "Shell" Geeklet onto your desktop.  Configure it any way you’d like in terms of position – for the sake of comparison, the screenshot below shows the settings for my date and weather Geeklet.

Date and weather Geeklet settings
Date and weather Geeklet settings
Categories
Archived Linux Mac & OS X Uncategorized

A couple more BASH prompt examples

Yesterday I published an article called "Pimp My Prompt … like Paul Irish" in which I showed how to make your BASH prompt similar to the one used by Paul Irish.

I also included a couple of sample prompts that you could use for reference so I figured I’d write a follow-up article that shows what they look like.  So, without any further ado, here they are.

Example 1 – Green username, blue host, magenta working directory, white git branch:

PS1='${GREEN}u${BLACK}@${CYAN}h:${MAGENTA}w${WHITE}`__git_ps1 " (%s)"`$ ‘

The example above uses the short colour codes outlined in the original article and looks like the screenshot below.

Green username, blue host, magenta working directory
Green username, blue host, magenta working directory

Example 2 – Blue user and host, magenta working directory, white git branch:

PS1='[33[0;36m]u@h[33[01m]:[33[0;35m]w[33[00m][33[1;30m][33[0;37m]`__git_ps1 " (%s)"`[33[00m][33[0;37m]$ '

The example above uses the built-in colour codes but can be harder to read.  It looks like the screenshot below.

Blue user and host, magenta working directory, white git branch
Blue user and host, magenta working directory, white git branch

Don’t forget to read the original article, "Pimp My Prompt … like Paul Irish", if you’re unsure about how to enable the __git_ps1 and short colour code commands.

Categories
Archived Linux Mac & OS X Uncategorized

Pimp My Prompt … like Paul Irish

There’s been a lot of talk lately about those cool colours that Paul Irish uses in his videos.  If you don’t know who Paul Irish is and you dabble in a bit of web design … well … shame on you!  😉  The things referenced in this article, including the prompt, can be found in Paul’s YouTube video entitled "The Build Script of HTML5 Boilerplate: An Introduction".  Anyway, I think the prompt colours are pretty useful, especially if you’re speedy at navigating your way around the CLI/shell in Linux or OS X and want to see where you are very quickly..  They help identify where you are in the file system, whether or not your current working directory is a git branch and, depending on what options you set, whether or not there are untracked files present etc.

Here’s what Paul’s prompt looks like (screenshot from the video linked above).

Paul Irish’s OS X prompt
Paul Irish’s OS X prompt

I believe Paul is using iTerm, as am I.  Combined with the stuff below, my iTerm configuration looks like this:

iTerm Configuration
iTerm Configuration

Pimp my prompt!

Ok, so you want your prompt to look like that?  It’s not that hard, actually.  You have to grant me a little latitude, though, as I’m guessing what Paul uses the various CLI prefix symbols for.  In this example I’m using an "o" to indicate a working outside a git branch and a + to indicate that the current working directory is a git branch.

This only works if you’re running an OS X or Linux shell – I’m sure you can do it with Windows but I’m not going to cover that here.

Step 1

If you haven’t got one already, open or create a file called .bash_profile in your home (~) folder.  You might be asking why not use .bashrc?  We want the command we’re adding to apply to interactive login shells – .bashrc only applies to interactive non-login shells.  There is an exception to this if you’re using OS X (like me) – .bash_profile is run for each new Terminal.app window, by default.

If a file with that name already exists, make sure you don’t remove anything from it that you want to keep.  From here I’m going to explain what each part of my .bash_profile does.  The complete file will be shown at the end, including a couple of extra bits.

Note: If you’re going to include the git parts, you’ll need to download the git source and put the file .git-completion somewhere (mine is in my home directory).

Categories
Archived Design Mac & OS X Uncategorized

A couple of deviantART submissions

Over the last couple of days I’ve been hacking about with theming in OS X.  It’s something I’ve always quite liked since back in the day when WindowBlinds used to be the way forward on Windows.

The first theme setup I tried incorporated the Gill Sans Text Dock Icons available from deviantART.  Because the icon collection didn’t have icons for some of the apps I use, I made my own and submitted them for others people to use.  The first collection extension is available on deviantART by going to Gill Sans Text – More Icons.  I’ve also made an icon for Traktor Scratch Pro after another user requested it – it can be downloaded from Traktor Scratch Pro for Gill Sans Text on deviantART.

New theme?

I then tried the Float Dock Icons that I found on a MacThemes forum – they’re awesome!  That didn’t have icons for some of the most popular apps, either, so I made some for the best-known Adobe apps.  The icons can be downloaded from Round shiny Adobe dock icons on deviantART.  Cool.  🙂

What did I come up with?

After playing about with a ton of different combinations I came up with one that I quite like.  It’s simple (in my opinion) yet functional without being overly garish – check it out.

Modified OS X desktop
Modified OS X desktop

Why?

Why did I do this?  There’s really no good reason other than being a bit of a geek and needing an excuse to dive back in the graphics software that I’ve been missing lately.  I’m no designer (obvious, huh) but doing this stuff is pretty relaxing.  🙂

How?

I’m in the process of writing up how I made those changes now so if you’re interested in doing this yourself, stay tuned.