sxta


#!/usr/bin/perl -w
#
# sxta -- create a bunch of tabbed Gnome-terminal windows
#

use strict;

my ( $x, $y, $dx, $dy );    # position and spacing of terminal windows
my $xtcmd;                  # generated command
my $tw;                     # terminal window key

#
# each terminal window has one or more associated profiles,
# each in its own tab...
#
my %proflist = (
    'granite'        => ["Granite"],
    'granite-sysman' => ["Granite-Sysman"],
    'loginservers'   => [ "Alberti", "Hypatia", "Turing" ],
    'franklin'       => ["Franklin"],
    'unhinfo'      => [ "Enigma",   "Haiku" ],
    'mailscanners' => [ "Dixville", "Ossipee", "Unity" ],
    'misc' => [ "Bamboo", "Stark", "Sullivan", "Tautology", "Neat1", "Neat2" ],
);

my @terminals = qw(granite loginservers granite franklin granite mailscanners
  unhinfo misc granite-sysman);

$x  = 0;
$y  = 150;
$dx = 120;
$dy = 75;

foreach $tw (@terminals) {
    $xtcmd =
      "/usr/bin/gnome-terminal --window-with-profile="
      . join ( ' --tab-with-profile=', @{ $proflist{$tw} } )
      . " --geometry +$x+$y &";

    system($xtcmd);
    $x += $dx;
    $y += $dy;
}