Question

I have a text file called stocks.txt it looks like this:

AAPL    [1;37m  96.15[00m[32m      0.55     (0.58%)[00m
GOOG    [1;37m 566.07[00m[31m     -5.53    (-0.97%)[00m
FB      [1;37m  72.28[00m[31m     -0.37    (-0.51%)[00m
MSFT    [1;37m  42.86[00m[31m      -0.3    (-0.70%)[00m

The things that look like [00m are colors of the text. When I use cat to read the file in Terminal it lines up and looks organized. When I try to do the same thing as a GeekTool shell command it messes up the spacing. What can I do to make it look right.

In terminal:

enter image description here

In GeekTool:

enter image description here

Was it helpful?

Solution

The mis-alignment is a result of using a variable width font. Switch to a fixed-width font in the Geeklet and you'll see the text aligned similar to how it is in the Terminal app.

Open the Geeklet editor and under the Style section press the Click here to set font & color button.

Geeklet configuration

If you like the way your content looks in the Terminal.app you can use the Monaco font for your Geeklet -- that's the same font Terminal.app uses. You see your Terminal.app font settings under Terminal > Preferences... on the Settings tab.

Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top