Skip to content
This repository has been archived by the owner on Aug 29, 2020. It is now read-only.

Commit

Permalink
Increase cpu and mem percentage padding
Browse files Browse the repository at this point in the history
  • Loading branch information
cjbassi committed Apr 20, 2018
1 parent ee84a9d commit 33e6b73
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions widgets/proc.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package widgets

import (
"fmt"
"os/exec"
"sort"
"strconv"
Expand Down Expand Up @@ -280,8 +281,8 @@ func FieldsToStrings(P []Process) [][]string {
strings[i] = make([]string, 4)
strings[i][0] = strconv.Itoa(int(p.PID))
strings[i][1] = p.Command
strings[i][2] = strconv.FormatFloat(p.CPU, 'f', 1, 64)
strings[i][3] = strconv.FormatFloat(float64(p.Mem), 'f', 1, 32)
strings[i][2] = fmt.Sprintf("%4s", strconv.FormatFloat(p.CPU, 'f', 1, 64))
strings[i][3] = fmt.Sprintf("%4s", strconv.FormatFloat(float64(p.Mem), 'f', 1, 32))
}
return strings
}
Expand Down

0 comments on commit 33e6b73

Please sign in to comment.