diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/desktop/i3status-wrapper | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/desktop/i3status-wrapper b/scripts/desktop/i3status-wrapper index 0f8f96ec..665630b3 100755 --- a/scripts/desktop/i3status-wrapper +++ b/scripts/desktop/i3status-wrapper @@ -115,6 +115,8 @@ open STDIN, "<&=", $pipe->fileno or die "couldn't reopen STDIN!"; my $hostname = hostname; my $username = $ENV{LOGNAME} || $ENV{USER} || getpwuid($<); +my $hostinfo + = { name => "hostinfo", full_text => $username . "@" . $hostname }; # Skip the first line which contains the version header. print scalar <>; @@ -137,8 +139,7 @@ while (my ($statusline) = (<> =~ /^,?(.*)/)) { full_text => "Caffeinated: " . $info{caffeinated_name} } if $info{caffeinated_name}; - unshift @$blocks, - { name => "hostinfo", full_text => $username . "@" . $hostname }; + unshift @$blocks, $hostinfo; print encode_json($blocks) . ",\n"; } |