Stupid Mac OS X Tricks: Terminal + Top
#!/usr/local/bin/perlI 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).
use Mac::Glue;
my $term = new Mac::Glue 'Terminal';
$term->activate;
$term->do_script(wi th_command => 'top -u');
my $win = $term->obj(window => 1);
$win->prop('number_of_rows')->set(to => 50);
$win->prop('position')->set(to => [0, 25]);
Sure, I can just open a terminal window manually and type `top -u`, but that seems so silly when I can just do this!
Leave a comment