|
@@ -49,16 +49,25 @@ sub set_prefs { |
|
|
set("display-panes-time", "5000"); |
|
|
set("display-panes-time", "5000"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
sub get_hostname { |
|
|
|
|
|
my $hostname = $ENV{"HOSTNAME"}; |
|
|
|
|
|
if (! $hostname) { |
|
|
|
|
|
$hostname = `hostname`; |
|
|
|
|
|
$hostname =~ s/\n//; |
|
|
|
|
|
} |
|
|
|
|
|
return $hostname; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
sub set_status_line { |
|
|
sub set_status_line { |
|
|
my $user = $ENV{"USER"}; |
|
|
my $user = $ENV{"USER"}; |
|
|
my $hostname = $ENV{"HOSTNAME"}; |
|
|
|
|
|
|
|
|
my $hostname = get_hostname(); |
|
|
my $tmux_v = `tmux -V`; |
|
|
my $tmux_v = `tmux -V`; |
|
|
$tmux_v =~ s/\n//; |
|
|
$tmux_v =~ s/\n//; |
|
|
set("status-right", "${user}\@${hostname} | ${tmux_v} "); |
|
|
set("status-right", "${user}\@${hostname} | ${tmux_v} "); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
sub set_colors { |
|
|
sub set_colors { |
|
|
my $hostname = $ENV{"HOSTNAME"}; |
|
|
|
|
|
|
|
|
my $hostname = get_hostname(); |
|
|
my $color = $color_prefs{$hostname}; |
|
|
my $color = $color_prefs{$hostname}; |
|
|
if (! $color) { |
|
|
if (! $color) { |
|
|
$color = $color_def; |
|
|
$color = $color_def; |
|
|