From 4c043568105682af56a375135a77df2d0f0ef321 Mon Sep 17 00:00:00 2001 From: eleksir Date: Sun, 8 Mar 2020 14:43:39 +0300 Subject: [PATCH] i3status-timers*: tinker a bit cpuspeed stat --- i3status-timers | 9 ++++----- i3status-timers.dbus | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/i3status-timers b/i3status-timers index e48a7e4..35061e3 100644 --- a/i3status-timers +++ b/i3status-timers @@ -81,8 +81,8 @@ while (1) { $slow_timer = 0; } -# my $str = $cpuspeed; my $str = caps(); +# $str .= $cpuspeed; $str .= $net; $str .= $cputemp; $str .= $la; @@ -107,9 +107,8 @@ while (1) { sub gettimestr() { my ($sec, $min, $hour, $mday, $mon, $year, $wday) = (localtime)[0,1,2,3,4,5,6]; $year = $year + 1900; - my $str .= sprintf(" | %s, %s %s %s %02s:%02s ", $wdays[$wday], $mday, $months[$mon], $year, $hour, $min); - return $str; + return sprintf(" | %s, %s %s %s %02s:%02s ", $wdays[$wday], $mday, $months[$mon], $year, $hour, $min); } sub getlastr() { @@ -123,7 +122,7 @@ sub getlastr() { seek $LAHANDLE, SEEK_SET, 0; $la = (split(/ /, $la, 2))[0]; - return (" | LA: $la "); + return " | LA: $la "; } sub getbatterychargestr2() { @@ -256,7 +255,7 @@ sub ifaces() { } sub cpuspeed() { - my $str = 'cpu:'; + my $str = '| cpu:'; opendir(C, "/sys/devices/system/cpu/cpufreq") or do { return ''; diff --git a/i3status-timers.dbus b/i3status-timers.dbus index 1e1e465..7390fbf 100644 --- a/i3status-timers.dbus +++ b/i3status-timers.dbus @@ -83,8 +83,8 @@ while (1) { $slow_timer = 0; } -# my $str = $cpuspeed; my $str = caps(); +# $str .= $cpuspeed; $str .= $net; $str .= $cputemp; $str .= $la; @@ -262,7 +262,7 @@ sub ifaces() { } sub cpuspeed() { - my $str = 'cpu:'; + my $str = ' | cpu:'; opendir(C, "/sys/devices/system/cpu/cpufreq") or do { return '';