This application is a part of the nwg-shell project.
This project is a Go version of my psuinfo python script, written for educational purposes, and also for better
performance. The code only implements these psuinfo
features that I actually use.
The program uses the gopsutil module, Copyright (c) 2014, WAKAYAMA Shirou.
For use with bars like Waybar or polybar, the gopsuinfo -c <components_string>
is suitable. It prints
system information in a single line:
gopsuinfo -c gatmnu
For panels capable of displaying an icon and text, like tint2
or nwg-panel, you need to define an executor for each component.
For instance gopsuinfo -i m
will return a path to the memory icon, and the current memory usage:
/usr/share/gopsuinfo/icons_light/mem.svg
2103/22008 MiB
Add all the components you need to this way. Sample output with monochrome icons in nwg-panel:
❯ gopsuinfo -h
Use gopsuinfo list_mountpoints to see available mount points.
Usage of gopsuinfo:
-c string
Output (c)omponents: (a)vg CPU load, (g)rahical CPU bar,
disk usage by mou(n)tpoints, (t)emperatures,
networ(k) traffic, (m)emory, (u)ptime (default "gatmnu")
-d string
CPU measurement (d)elay [timeout] (default "900ms")
-dark
use (dark) icon set
-i string
returns (i)con path and a single component (a, n, t, m, u) value
-ls
(l)ist temperature (s)ensors
-p string
quotation-delimited, space-separated list of mount(p)oints (default "/")
-t Just (t)ext, no glyphs
-ts string
show temperature for a certain (t)emperature (s)ensor (-ls to list available sensors)
-v display (v)ersion information
Install from your Linux distribution repository, if possible.
Otherwise, clone the repository:
git clone https://github.com/nwg-piotr/gopsuinfo.git
cd gopsuinfo
Get the gopsutil library:
make get
Build binary:
make build
Install files:
sudo make install
sudo make uninstall