Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

pudge (1)

  (email not shown publicly)
AOL IM: Crimethnk (Add Buddy, Send Message)

I run this joint, see?

Journal of pudge (1)

Monday September 15, 2003
10:57 PM

Stupid Mac OS X Tricks: Terminal + Top

[ #14726 ]

use Mac::Glue;
my $term = new Mac::Glue 'Terminal';
$term->do_script(with_command => 'top -u');
my $win = $term->obj(window => 1);
$win->prop('number_of_rows')->set(to => 50);
$win->prop('position')->set(to => [0, 25]);

I stick this in ~/Library/Scripts and access it from the Script menu. Setting the number of rows makes the window taller, and setting the position puts the window in the top left (else it might end up anywhere on the screen).

Sure, I can just open a terminal window manually and type `top -u`, but that seems so silly when I can just do this!

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.