line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package X11::Terminal::Konsole; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
65846
|
use Moose; |
|
1
|
|
|
|
|
460619
|
|
|
1
|
|
|
|
|
9
|
|
4
|
|
|
|
|
|
|
extends 'X11::Terminal'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = 1.0.0; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
X11::Terminal::Konsole - Create customised konsole windows |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 SYNOPSIS |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
This module provides an object interface to launching konsole windows. |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
use X11::Terminal::Konsole; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
my $t1 = X11::Terminal::Konsole->new(); |
19
|
|
|
|
|
|
|
my $t2 = X11::Terminal::Konsole->new(host => "remoteserver"); |
20
|
|
|
|
|
|
|
my $t3 = X11::Terminal::Konsole->new(profile => "special"); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
for ( $t1, $t2, $t3 ) { |
23
|
|
|
|
|
|
|
$_->launch(); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=over 4 |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=item X11::Terminal::Konsole->new(%attr); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Create a new Konsole object, optionally with the specified attributes |
34
|
|
|
|
|
|
|
(see below). |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=back |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Each of the following attributes provide an accessor method, but they can |
42
|
|
|
|
|
|
|
also be set in the constructor. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=over 4 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=item host |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Specifies the remote host to log in to (using ssh). |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=item agentforward |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
If the host has been specified, and agentforward is true, the login to that |
53
|
|
|
|
|
|
|
host will use SSH Agent Forwarding. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=item xforward |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
If the host has been specified, and xforward is true, the login to that |
58
|
|
|
|
|
|
|
host will use SSH X Forwarding. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=item profile |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Set the Konsole profile name |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=back |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 OTHER METHODS |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=over 4 |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=item launch($debug); |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Calculates (and returns) the command that will launch your gnome-terminal. |
74
|
|
|
|
|
|
|
It also runs that command in a child process - unless $debug is specified. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=item terminalArgs(); |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Return the arguments that will be passed to the gnome-terminal. This will |
79
|
|
|
|
|
|
|
provide the customisations. There should be no reason to call this method |
80
|
|
|
|
|
|
|
directly. |
81
|
|
|
|
|
|
|
=cut |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
sub terminalArgs { |
84
|
18
|
|
|
18
|
1
|
32
|
my ($self) = @_; |
85
|
|
|
|
|
|
|
|
86
|
18
|
|
|
|
|
26
|
my $args = ""; |
87
|
18
|
100
|
|
|
|
423
|
if ( my $name = $self->profile() ) { |
88
|
3
|
|
|
|
|
7
|
$args .= " --profile $name"; |
89
|
|
|
|
|
|
|
} |
90
|
18
|
|
|
|
|
43
|
return "$args"; |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=back |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 SEE ALSO |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
L<X11::Terminal> |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 COPYRIGHT |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Copyright 2010-2011 Evan Giles. |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
This module is free software; you can redistribute it and/or modify it |
104
|
|
|
|
|
|
|
under the same terms as Perl itself. |
105
|
|
|
|
|
|
|
=cut |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
1; # End of X11::Terminal::Konsole |