You are not logged in.

#1 2021-01-07 06:27:13

mocha
Member
Registered: 2013-07-26
Posts: 1

XFCE network monitor panel

Thanks to whomever coded this excellent little XFCE network monitor panel application.

https://wiki.archlinux.org/index.php/XF … tor_applet

I run Xubuntu and found that the tooltip displayed the status of tons of "loop" devices.  Applying my simple modification to the code takes care of that.  I just wanted to share in case someone else needs this.


$ diff -u xfce-hkmon.cpp xfce-hkmon_mod.cpp 
--- xfce-hkmon.cpp	2021-01-06 12:29:19.339801125 -0800
+++ xfce-hkmon_mod.cpp	2021-01-06 16:07:22.321210830 -0800
@@ -297,7 +297,8 @@
             if (!(diskinfo >> skip >> skip >> name)) break;
             if (!name.empty()
                 && (prev.empty() || (name.find(prev) != 0)) // skip partitions
-                && (name.find("dm") != 0)) // skip device mapper
+                && (name.find("dm") != 0) // skip device mapper
+                && (name.find("loop") != 0)) // skip loop devices
             {
                 prev = name;
                 Device& device = devices[name];

Offline

Board footer

Powered by FluxBB