1

i3status-timers*: tinker a bit cpuspeed stat

This commit is contained in:
eleksir
2020-03-08 14:43:39 +03:00
parent 6dab9c5d8e
commit 4c04356810
2 changed files with 6 additions and 7 deletions

View File

@@ -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 '';

View File

@@ -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 '';