Posted about 6 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.

Growing Rails Applications in Practice
Check out our new e-book:
Learn to structure large Ruby on Rails codebases with the tools you already know and love.

Owner of this card:

Avatar
Arne Hartherz
Last edit:
almost 6 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