Add support to change screen titles
This commit is contained in:
parent
6ccd447870
commit
1133138f86
|
@ -69,6 +69,8 @@ my $hispaddr = sockaddr_in($port, $hisiaddr);
|
|||
|
||||
###send(SOCKET, 0, 0, $hispaddr);
|
||||
|
||||
my $xterm=0;
|
||||
my $screen=1;
|
||||
|
||||
my $crcerr=0;
|
||||
my $errors=0;
|
||||
|
@ -82,8 +84,30 @@ if($verbose){
|
|||
$dev=~s!/dev/!!;
|
||||
};
|
||||
print "OpenBeacon Reader $id sending [$dev] to [$server:$port]\n";
|
||||
if($xterm){
|
||||
print "\e]2;",
|
||||
"$id\[$dev] -> $server:$port @ ",
|
||||
strftime("%Y-%m-%d %H:%M:%S ",localtime),
|
||||
"\a";
|
||||
}elsif($screen){
|
||||
print "\ek",
|
||||
"$id\[$dev]",
|
||||
"\e\\";
|
||||
};
|
||||
print "\n";
|
||||
};
|
||||
|
||||
sub interrupt {
|
||||
if($xterm){
|
||||
print "\e]2;", "<exit>", "\a";
|
||||
}elsif($screen){
|
||||
print "\ek", `hostname`, "\e\\";
|
||||
};
|
||||
exit;
|
||||
}
|
||||
if($verbose){
|
||||
$SIG{INT} = \&interrupt;
|
||||
};
|
||||
my $lasttime=time;
|
||||
my $llasttime=time;
|
||||
my $pkt;
|
||||
|
|
Loading…
Reference in New Issue