diff options
author | Caleb Bassi <calebjbassi@gmail.com> | 2018-04-14 09:01:15 -0700 |
---|---|---|
committer | Caleb Bassi <calebjbassi@gmail.com> | 2018-04-14 09:02:26 -0700 |
commit | fdf5ef2555c2b80d651d2e6f26bea7759ef5e73c (patch) | |
tree | 68dbc6d6f628ec8622a716ae4aa5962ff8d354ff /widgets | |
parent | 4d809023d356c6094725d6558c2c5757075c7234 (diff) |
Cleanup
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/proc.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/widgets/proc.go b/widgets/proc.go index 89ef58c..bf41dfb 100644 --- a/widgets/proc.go +++ b/widgets/proc.go @@ -7,15 +7,22 @@ import ( "time" ui "github.com/cjbassi/termui" + "github.com/mattn/go-runewidth" psCPU "github.com/shirou/gopsutil/cpu" psProc "github.com/shirou/gopsutil/process" ) +var arrowWidth int + const ( UP = "▲" DOWN = "▼" ) +func init() { + arrowWidth = runewidth.StringWidth(UP) +} + // Process represents each process. type Process struct { PID int32 |