A bash script to mess with the containing Terminal.app window

I found it, but I still don’t have a clue as to why I wrote it to begin with:

function setgeometry
{
    local rows=`expr "$1" : '[0-9]*x([0-9]*)$'`
    local cols=`expr "$1" : '([0-9]*)x[0-9]*$'`
    case $TERM in
        Apple_Terminal)
            window=`osascript -e 'tell app "Terminal" to get first window'`
            #echo $window
            osascript -e 'tell app "Terminal"'
                             -e "set number of rows of $window to $rows"
                             -e "set number of columns of $window to $cols"
                         -e 'end tell'
            return $?
            ;;
        *)
            echo "Sorry, I don't know how to do that in $TERM"
            return 1
            ;;
        esac
}

It doesn’t seem to work anymore, but the concept is still valid (i.e., osascript -e ‘tell app “Terminal”‘ -e ’set blib to first window’ -e “get blib’s number of columns” -e ‘end tell’ will actually tell you something, although that’s hardly a useful example).

AppleScript | Permalink | No Comments

Public…ness?

I made a major purchase recently. Shortly afterwards, I had a fairly complete blog post about it floating around in my head — this isn’t it. In fact, I’m not even sure I’ll still write that other post (which probably makes this one all the more peculiar, considering).

Anyway, right about the time I was getting ready to actually commit it to paper…er…bits, I was watching It Takes a Thief on Discovery. This probably wasn’t an especially notable episode (if there even is such a thing); it’s more about their goofy factoid for that episode.

Basically, his point was that all too often he’ll be sitting in a bar drinking when some other nimrod in the bar is bragging about their last trip to BestBuy; which is sort of a problem if the guy in the next stool just happens to be a professional thief.

So, I was left thinking, what if I actually had readers other than Erwin, and one of them was a thief, and happened to know who I am or where I live? Can you actually put yourself in real danger by announcing on the web that you just bought a new Iblam-O 5000 and accidentally shaved your cats and children trying to figure out how to use it?

People talk about the “fine line” between poignant observational blogging and drivel about what your cat “told” you today, but what about the fine line between talking about life and advertising what stuff you have so some jerk can swipe it?

Weblog | Permalink | No Comments

A. Cluttered

I’ve been staring around my office (at home), marveling at the state it is in. And I don’t mean that in a good way. Over the weekend (and, now that I think about it, it probably wasn’t the most recent one), Erwin mumbled something about putting together another shelving unit; I need to do the same, only I don’t have the shelves. Or the framing bits the shelves go into. Or the crap cleared out of the space I’m going to put shelves once I have them.

The shelving units I have in mind are modular, so it isn’t really a problem that we don’t want to stay here, and that the measurements I’ll use when I finally buy them won’t likely be the same as those wherever we live next. In fact, we’d be better off with the shelves rearranged to fit new space and have some parts left over in the closet — we have that now, only the spare parts belong to non-modular shelving units that we’d really rather not see ever again.

I did wander outside with a measuring tape eventually, though, and decided that I could fit the 82″ uprights in my car without needing a red flag (there’s a limit on how much of something you can have hanging out the back without such festive decorations); at least I have that going for me.

Q. (reference to dumb commercial) Every room starts with an adjective; what’s yours?

Weblog | Permalink | No Comments