Semibold keyboard shortcut in Pages

So… Turns out there is no shortcut to turn text to semibold in Apple Pages, from the iWork suite. There are shortcuts for bold and italic respectively, but not semibold (or light / ultralight for that matter) even for the fonts that support it.

The closest thing to a solution that I found is through Character Style:
– Select a piece of text, make it semibold
– In the Styles Drawer, under Character Styles, click on the little arrow next to “none” and “Create New Character Style From Selection
– Assign a Hot Key to the newly created Character Style, by clicking the arrow next to it and Hot Key.

There are a few drawbacks to this approach, mainly that the character style you’re defining will be tied to a particular font, and that the only shortcuts allowed by the Hot Key setting are F1 to F6. If anyone has a better way, I’m all ears!

Automatically restart applications on OS X

I use GimmeSomeTune to provide hotkeys and some other goodies for iTunes. It works alright, but is veeeery crashy — usually every dozen hours or so on my machine.

How to fix that? Let’s relaunch it as soon as it crashes. Simple!

In a terminal:
for (( ; ; )); do open -W /Applications/Multimedia/GimmeSomeTune.app/; done

open is the bash command to launch applications on OS X. It works with all kinds of files: open somefile.avi will open that file in your default video player, VLC for example. The -W flag tells open to wait until the application exits before returning any value. By putting it all in a for loop, we effectively ensure that bash will launch GimmeSomeTune, wait until it crashes, then relaunch it, and so on.

Edit: this is a bad way of doing things. A better way is described here.