Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Support Us

Top Posters


Here's a little something I whipped up in order to display system information in a bar or panel in a WM-only setup (like my i3 environment). Since most panels just display data grabbed from STDOUT, this script just prints to STDOUT.  There is no included timer mechanism because the consuming bar/panel/dock usually has that taken care of, if not, writing a quick bash script with a sleep timer running in a loop is trivial (if you're using a script like this to pipe output to a panel, it's trivial to write a while loop and call "sleep()").

Anywho, here's a link to the sources on Github.  The only dependencies are Python 3 and psutil (a Python package in the stable/core repos of most distros).  I haven't tested this under Python 2, so if you find a bug, let me know in the Github Issues section of the repo and I'll figure it out.

Here's an obligatory screenshot of the output in i3's bar:


And for convenience, here's a bash script to call the script (use the bash script as the argument for "status_command" in the "bar" section of i3's config if that's the WM you're using):

# ~/bin/
while :; do
    SYSINFO=$(python3 $HOME/bin/ -d / /home -l 1 -m 1 -c 1)
sleep $SLEEP_SEC
Sign In or Register to comment.