-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Additional customizable tray monitors ( I would like a Drive Space Monitor, for example ) #386
Comments
If you have icons, could you perhaps post a few as an example of what you have in mind? |
Why not use a systray drive space monitor? |
The slimmest drive space tray monitor I could find needs 26mb of memory, if I could get it to work. The one that did work was 35mb, about double what IceWM takes. On the old machines many are maxxed out on memory, ie 256mb or 372mb, and the browsers have gotten huge, and those same machines are the ones with the small drives that are tight on space. A reload takes 1/2 a day, so I rather not see them run out of space. I found 2 programs that looked light enough to be possible, but the one was a patch for DWM, and the other an ancient C program of an embedded tray example that I managed to get to compile and run (not actually to DO anything, just run) and go into the tray for 6mb, but it needed 100% of the CPU to sleep. I bought a C book and one of my projects is to learn to debug it, but I haven't gotten there, yet. |
I am an idiot! Disk storage is just like memory storage, it is either used or free and usage goes from 0 to 100%. Therefore, why can't it just be a status monitor just like the memory one? The only location really important on most systems is /. If a Disk Space Monitor was over to the left of the battery monitor, you would know at a glance it was for disk space, and it could have a tooltip showing the obvious info, and a click command that could be configured to bring up your favorite disk space management program. The code and config could almost be a copy of the memory monitor. Would that be feasible? Here are snips of the calculations used by DWM's script one... https://github.com/joestandring/dwm-bar/blob/master/bar-functions/dwm_resources.sh
|
I can see that a monitor internal to icewm would cost the least amount of memory, but the danger is that it would take several iterations of new and changed feature requests that it would all in all still take quite some time to develop, even though its demands could in theory be well-stated before coding begins. Your assumption that root is the most important is not general. One needs to be able to specify which filesystems, like the network monitors can use wildcarded specifications. For instance, when using a Logical Volume Manager you get many critical filesystems which can fill up. Maybe one wishes to exclude network filesystems, because polling causes extra network traffic? Should the monitor consist of vertical bars like the battery monitor or a graph of multiple levels like the memory monitor. The latter is quite boring I think. Maybe its time should be logarithmic? Does a percentage of full capicity suffice or do you need free MB remaining? Etc. The difficulty is getting all the details precisely stated and be general for all uses for everyone. The code example you quote is actually quite inefficient, because it causes so many processes to be started. It could have been: df -h /home | if read a STOTOT STOUSED d STOPER; then
printf "💻 MEM %s/%s CPU %s STO %s/%s: %s" "$MEMUSED" "$MEMTOT" "$CPU" "$STOUSED" "$STOTOT" "$STOPER"
fi |
Yes, I was thinking about the type of graph over night, and what would suffice would be a single line down from the simple percentage used of total to the 0 line filled with that color for that timeframe. Perhaps the color could have 5 change increments rather than just green, greenish yellow, yellow, orange, and red and go with a white filler at the top to distinguish it from the other monitors visually. Obviously, making it look nice would be appreciated. My circles looked horrible. Well intentioned, but horrible :) And yes, making it configurable like the network monitors to allow for more than one monitor would be good, but if that makes it a big project, it is a "nice to have", not "absolutely needed". For most distros I install it is the root filesystem that runs out of space installing programs or downloading videos or ISO's or making movies because usually the /home filesystem is not separate by default. I'm not saying it wouldn't be a good feature, just that on the older systems where memory and CPU time are precious, installs tend to be pretty basic. Disk status monitor could be off by default, and an example could be provided showing how to turn it on for the root directory (and another if allowing multiple monitors). The tooltip would show a label ie / and both values, units and percentages for Total, Used and Free on 3 lines. The command on click could run any of the disk usage analysis programs that are installed by default if turned on. I could come up with a command line to default it with from the distro's I have installed. |
I wish I could do it myself but its not a good beginner project. |
I have thought about this more, and have tried a few times now to do it, but basically a disk is like a battery, it has a capacity=100%, already used, and available to use. The default colors could be sky blue for capacity as the background, and deep red for already used. The tooltip could show these as percentages and human readable. Different drives would be akin to different batteries, and the default could be /. Each drive could be repeated for X configurable width of the DFMonitor graph. Maybe I would want them set at 3 wide and have 4 drives monitored for a total monitor width of 12. If one drive was getting full it's bars would be taller. That way we don't have 10 separate DFMonitors taking up the tray. Hover over it and it shows a list of the drives being monitored and the values of each in the same sequence as they are displayed. Click on it and it runs a designated program like the CPU, Memory or Network monitors can. If you are willing to be fancy, add a warning alert color at XX percent full, and a severe warning alert at XX percent full at which time it blinks and plays a sound (if specified) every time its checked and >= to the percentage. Much of the logic could be cloned from the existing APM logic and called DFM logic. Existing APM Configuration settings could be cloned by exchanging the letters APM for DFM, plus the warning alert ones and click on monitor program to run. I don't really know enough about Linux to know what are the limits that you are capable of in terms of what could be monitored, but I can see above it's way beyond what I could anticipate. I would suggest that my request should be viewed on the simple side, for example if df were used to retrieve the values, then a limit of what df is able to retrieve would be fine, and I would think that would help most users. They probably run out of space all the time like I do occasionally. I did again the other day. Its pretty easy to do when running off a flashdrive. I hope you understand that my purpose is to make this the GoTo window manager for those who don't have the best computers, but need to get from point A to point B with them just the same. antiX is supporting a school in Germany, and making their almost antique Linux boxes run rings around the pokey MS crap, based on antiX and IceWM. And the beauty of it is that everytime we make it better for them, it's better for everyone else, too. |
It could be similar to or possibly use the same code as one of the other monitors since the calculations would be very similar.
It would have a tray icon like a disk drive Maybe round with rings, or a flat bar, and the label could be in a foreground text color underneath, and empty space would be green by default, used space would be red by default.
The Default would be space monitoring for "/", but possibly like the network and battery monitors additional monitored locations like "/home" could be added.
I have tried a number of ways to get this, and all the tray icons available take between 25 and 40 mb of memory, so are not sensible for the older systems. I have also looked at coding a tray icon program to do it myself, but don't have the coding skills to do it.
PS: I was thinking more about this, and what might be both easier and better would be to have up to 4 generic tray icons 1 thru 4 available where I could specify in preferences to turn on tray icon #1 with a tooltip command and click command and icon drivespace-root.svg, and refresh it every 1000 milliseconds. Then icewm would display the icon and check every 2000 milliseconds by default to see if the icon file had been changed, and if so, refresh the icon. There could be a refesh program preference to run a script to create a refreshed icon based on whatever calculations I want. I would guess the effort would be much less and it would have very little impact on memory or performance, and people could use them to show the weather or drive space or whatever else might be important to them.
The text was updated successfully, but these errors were encountered: