- This topic has 11 replies, 5 voices, and was last updated Aug 6-11:55 am by BobC.
-
AuthorPosts
-
August 3, 2019 at 12:55 pm #25290Moderator
BobC
It would need to be simple and minimal memory/cpu required.
It would look like a disk drive, and colored green up to 70% used, yellow up to 85% used, and red above that
Displayed overlayed would be “/” for what drive on the top line and the percentage full ie “25% used” on the 2nd line
When you hover over it, it would say
Disk Space: /
Total Used Avail
20gb 5gb 15gb
100% 25% 75%I am thinking this could be parameter driven
heading
command (needs to return numeric values for total and used)
image filename and max percentage levels for good and caution, with critical being anything above that
colors always green, yellow and red, or could be 3 valuesAny thoughts? Does this exist already? Easy way to create?
Or something like that, format being not critical, whatever is easily available would be fine
August 3, 2019 at 2:01 pm #25295Member
manyroads
::I think that should be pretty easy to do with either conky or on polybar. There are scripts for both that should accomplish your objective(s).
Attached is an image of what I have on polybar…
The internet search gods offer quite a wealth of approaches here are two + :
https://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html
https://www.2daygeek.com/linux-shell-script-to-monitor-disk-space-usage-and-send-email/- This reply was modified 3 years, 9 months ago by manyroads.
Attachments:
Pax vobiscum,
Mark Rabideau - http://many-roads.com
"For every complex problem there is an answer that is clear, simple, and wrong." H. L. Mencken
dwm & i3wm ~Reg. Linux User #449130
20 Jan 2021 ~ "End of an Error"August 3, 2019 at 4:23 pm #25299ModeratorBobC
::Yes, conky has it, but reason for doing this is to put the conky info that is most important to me down in the tray.
I am trying to create an icon there with the icon telling me what (ie a disk drive symbol), the color telling me the status, and the values giving me a current reading (ie / has a value of 25%). Then if I want to see the details, I could hover over it for a tooltip, or click it to execute something.
I came up with this thanks to your link… It gets me part way there…
For a tooltip, output the result of this command, which gets rid of the tmpfs and udev lines:
$ df -h | grep -v -e '^[tmpfs |udev ]' Filesystem Size Used Avail Use% Mounted on /dev/sda4 21G 9.6G 9.9G 50% / /dev/sda1 534M 32M 503M 6% /boot/efi /dev/sdb5 200G 98G 103G 49% /media/BIGDataFor the actual values to display, output the value of this command, and I see I need columns 6 and 5:
$ df -h | grep -e '\/$' /dev/sda4 21G 9.6G 9.9G 50% /Therefore, this gets me the 2 values I need for my icon:
$ df -h | grep -e '\/$' | awk '{ print $6, $5 }' / 50%Ok, Now I need to get those to an icon in the tray every x or xx seconds…
August 3, 2019 at 5:53 pm #25302ModeratorBobC
::I think what I need to do is display an icon that gets redisplayed whenever it actually changes, not sure how to do that, LOL
And… have a script running in a sleep loop that changes the icon that is being displayed when the values change.
I’m looking for something cheap on memory and cpu so it doesn’t kill performance on the old ones…
August 3, 2019 at 8:15 pm #25303Memberex_Koo
::The below code is for i3 just not sure how this would work with GUI type desktop. How you get a script to run on the tray as an icon and change color.
Do you have tray output turned on in your conky..bar { status_command ~/.config/i3/conkybar.sh i3bar_command i3bar -t height 18 workspace_buttons yes font pango:Noto Sans 9 position top height 25 tray_output noneStill an in conky script
Still in conky.Sorry this is not much help..
August 4, 2019 at 5:43 am #25312Anonymous
::There’s also good old GKrellM monitoring tool.
It’s not on the task bar though.
http://gkrellm.srcbox.net/August 4, 2019 at 1:17 pm #25333ModeratorBobC
::I want to get it very compact, but down in the tray.
I found that it could be done with Yad or gtkdialog, but it costs 20 mb of memory…
Still trying…
If I can’t do it, I guess I’ll need to make an alarm of some kind.
August 4, 2019 at 3:23 pm #25344ModeratorBobC
::There are many similarities to a disk drive and a battery, only reversed. I worry about the battery getting empty, and worry about the disk getting full. Perhaps if it were looked at as percentage of disk AVAILABLE, the logic would be the same…
August 5, 2019 at 1:19 am #25362Anonymous
::Perhaps you should ask somebody here, who understands something about Python programming to modify the “spaceview”.
You can see it in action on the screenshots below. It works fine in Debian, but not in combination with IceWM.
Already by default, it even offers all “my” colors — blue and yellow, besides orange/green and purple one.August 5, 2019 at 8:00 am #25377ModeratorBobC
::Yes, thanks, that’s what I was looking for. I will investigate and try it.
Thanks
BobCPS: I got it to install and then to run and work, but it took 39 mb of memory, which for a 16 gb machine is nothing, but for a 512 mb machine is too much to spare. My next thought is to add the feature to IceWM. I will look at it, but not likely something that I can do. I’m not really sure an easy answer exists…
- This reply was modified 3 years, 9 months ago by BobC.
August 6, 2019 at 11:42 am #25433MemberPPC
::hi, bob, you also have https://github.com/SergKolo/udisks-indicator but it’s about the ram as the above app in what concerns RAM usage… 🙁 – it«s a phyton script…
If I find something else, I’ll send it your way…
P.August 6, 2019 at 11:55 am #25434ModeratorBobC
::YAD would be 26 mb it looks.
Volumeicon is 16 mb.
LOL, conky is under 10 mb, but it doesn’t go in the tray that I have ever seen.
The only indicator I am missing is available disk space. All the others I need are already built into IceWM.
I wish I could just clone the battery or network monitor indicators already in IceWM into a “filesystem” space indicator. Even hard coded for “/” it would provide proof of concept. It could work like the network status monitors where it puts up an icon for each partition listed if found. That would be the best solution, I’m sure, but beyond my meager talents, I’m afraid. I suppose I could try…
-
AuthorPosts
- You must be logged in to reply to this topic.
