Posted over 5 years ago. Visible to the public.

Simple memory information widget for the Xfce panel (or anywhere else where you can run a shell command)

I was unsatisfied with the existing memory status applets for the Xfce panel, so I wrote a little shell script that shows me just the information I need. Now I use it via a "Generic Monitor" panel applet.

Put this at some place like ~/bin/memory-info and chmod +x it:

Copy
#!/bin/sh meminfo=`free -m | grep 'Mem:'` used=`echo $meminfo | cut -d" " -f3` total=`echo $meminfo | cut -d" " -f2` cached=`echo $meminfo | cut -d" " -f7` really_used=`expr $used - $cached` echo "Memory usage: $really_used / $total (Cached: $cached)"

Next, add a "Generic Monitor" applet to your Xfce panel, fill in the name of the file you just created and set a refresh time that suits you (like 3 seconds). Done.

makandra has been working exclusively with Ruby on Rails since 2007. Our laser focus on a single technology has made us a leader in this space.

Owner of this card:

Avatar
Arne Hartherz
Last edit:
over 5 years ago
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Arne Hartherz to makandra dev
This website uses cookies to improve usability and analyze traffic.
Accept or learn more