fr - Free Resource Printer
fr is a command-line tool to print free resources in delicious
fr is to
htop is to
fr was written due to unhappiness with the bare-bones, hard-to-read
I wanted something a bit more… graphical.
Instead of this:
total used free shared buffers cached Mem: 4045216 2159764 1885452 0 192404 942944 -/+ buffers/cache: 1024416 3020800 Swap: 0 0 0
You'll see something more like this:
Free Resources in Blocks of 1 Megabyte (1,000,000 bytes) DEVICE VOLUME CAPACITY USED FREE MOUNT CACHE ⌁ RAM 4,142 1,421 1,461 ▉▉▉▉▉▉▉░░░░░░▏ 1,261 ▪ SWAP 0 ▪ sda1 Ubuntu 18,617 7,000 10,671 ▉▉▉▉░░░░░░░░░▏ / ▪ sda5 Data 88,107 85,218 2,889 ▉▉▉▉▉▉▉▉▉▉▉▉░▏ /media/Data ◗ sr0 PREDATOR 45,206 45,206 0 ▉▉▉▉▉▉▉▉▉▉▉▉▉▏ /media/PREDATOR
... in fruity colors if you so choose.
color can be turned off
NO_COLOR environment variable is supported),
network mounts filtered,
fr 3.x has been tested on
Ubuntu 18.04 Bionic "Tch-tch-tch-tch…",
MacOS 10.13 "High Sierra,"
Version 3.x of
fr has been ported and works only under Python 3.6 and
To use with an earlier version of Python,
which supports Python 2.7 and earlier platforms.
fr version 3.x,
Dbus and Udisks are no longer required or used on Linux.
data is read from the
/dev, and potentially
To install per user (add
pip3 install --user fr
To install system-wide as root:
sudo -H pip3 install fr
Support is still experimental. Could use some help as Win7 in a VM is all I have access to these days.
To install per user:
pip3 install --user fr[win]
(You'll need to add the install folder to your
To install for everyone, run as Admin:
pip3 install fr[win] # installs winstats, colorama
Mac OS X
Yes, it supports that too. Support is experimental as well:
[sudo] pip3 install [--user] fr
And off you go.
FYI, the Unicode block characters look a bit better with Source Code Pro as the terminal font—YMMV.
Could use some help here also,
borrowing a Mac is my only option.
df under the hood,
hoping there are better options?
Optical, Network, Removable
Both Windows and Mac OS are not currently able to detect whether extended properties of filesystems. The port to Python 3 seems to have broken Windows in that regard, which used to work.
I've given up on Unicode icons (for now) on the Windows console and went back to ASCII. Perhaps it should print out "conventional/high" memory too.
The Linux console (the real boot up console, pre-X) has a very limited character set and therefore uses ASCII as well.
Both Windows and the Linux (non-X11) consoles are limited to sixteen colors. Apparently Windows 10 has been upgraded to support more, but I haven't yet found documentation on how to detect it.
Run it ;)
And of course there are a number of options, spit out when this is typed:
Output will be in a compact format when the width of the terminal/console is under 90 characters. Give it more and it will expand to fill available space.
- 3.0 - Major rewrite to support Python 3.6, refactor shitty thirteen year-old code, remove deps on Dbus and Udisks. Still needs a lot of work.