Page 2 of 3

Re: Conky hard disk info

Posted: Mon Sep 18, 2023 12:08 pm
by wdscharff
i have already listed the corresponding conky commands above, simply adapt the font and colour specifications to your own system (or throw them out) and the "goto" instructions for formatting as well.

Code: Select all

${font Open Sans:Bold:size=12}${color}mounted ${color0}${hr 2}$color$font$

${font Open Sans:size=12}Data ${goto 80}${fs_used /media/DATA} / ${fs_size /media/DATA}   ${goto 220} ${color5}${fs_bar 8,250 /media/DATA}${color}  ${goto 500}${fs_free_perc /media/DATA}% frei ${color} ${goto 580}I/O: ${color5}${diskio_read /dev/disk/by-label/DATA}${color}  :  ${color5}${diskio_write  /dev/disk/by-label/DATA}${color}
 
${font Open Sans:size=12}evo850 ${goto 80}${fs_used /media/evo850} / ${fs_size /media/evo850}   ${goto 220} ${color5}${fs_bar 8,250 /media/evo850}${color}  ${goto 500}${fs_free_perc /media/evo850}% frei ${goto 580}I/O: ${color5}${diskio_read /dev/disk/by-label/evo850}${color}  :  ${color5}${diskio_write  /dev/disk/by-label/evo850}${color}
in my case it is also a matter of the fact that they have to fit into a rather wide conky, since my conky is 700px wide.
mounted.jpg

Re: Conky hard disk info

Posted: Mon Sep 18, 2023 6:42 pm
by Mjaakko
wdscharff wrote: Mon Sep 18, 2023 12:08 pm i have already listed the corresponding conky commands above...
That I already saw but what's under Root and Home.... syntax for Total/use: 243 GIB/31,1 GIB. Does it show HDD capacity or the / and /home. Until now, after several Google searches, only Inxi shows total capacity but doesn't work with Conky. Also, not with FvwmConsole.

Re: Conky hard disk info

Posted: Mon Sep 18, 2023 6:52 pm
by siamhie
@Mjaakko The link I posted (http://ifxgroup.net/conky.htm#fs_bar) has all the conky variables regarding hard drive information that can be shown.

Re: Conky hard disk info

Posted: Mon Sep 18, 2023 8:42 pm
by entropyfoe
Is what you want found in the MX-Antix17 conky?

Those last four lines provide the memory, swap, root partition, and data disk; both amount used, and the total size.

Code: Select all

....
${if_up $template4}
${color}$template4 up: $alignr${color3} ${upspeed $template4}
${color}$alignr${upspeedgraph   $template4 25,170 5599cc 5599cc}
${color}$template4 down: $alignr${color3} ${downspeed $template4}
${color2}$alignr${downspeedgraph $template4 25,170  5599cc 5599cc}${endif}${if_up $template5}
${color}$template5 up: $alignr${color3} ${upspeed $template5}
${color}$alignr${upspeedgraph   $template5 25,170 5599cc 5599cc}
${color}$template5 down: $alignr${color3} ${downspeed $template5}
${color2}$alignr${downspeedgraph $template5 25,170  5599cc 5599cc}${endif}${if_up $template6}
${color}$template6 up: $alignr${color3} ${upspeed $template6}
${color2}$alignr${upspeedgraph   $template6 25,170 5599cc 5599cc}
${color}$template6 down: $alignr${color3} ${downspeed $template6}
${color2}$alignr${downspeedgraph $template6 25,170 5599cc 5599cc}${endif}${if_up $template7}
${color}$template7 up: $alignr${color3} ${upspeed $template7}
${color2}$alignr${upspeedgraph   $template7 25,170 5599cc 5599cc}
${color}$template7 down: $alignr${color3} ${downspeed $template7}
${color2}$alignr${downspeedgraph $template7 25,170 5599cc 5599cc}${endif}
${color}${alignr}${color8}Used / Total
${color}mem:${alignr}$mem ${color3} /${color} $memmax
${color}swap:${alignr}$swap ${color3} /${color} $swapmax
${color}root:${alignr}${fs_used /} ${color3} /${color} ${fs_size /}
${color}Data:${alignr}${fs_used /media/Data} ${color3} /${color} ${fs_size /media/Data}
]]

Re: Conky hard disk info

Posted: Tue Sep 19, 2023 3:35 am
by wdscharff
Mjaakko wrote: Mon Sep 18, 2023 6:42 pm
That I already saw but what's under Root and Home.... syntax for Total/use: 243 GIB/31,1 GIB. Does it show HDD capacity or the / and /home. Until now, after several Google searches, only Inxi shows total capacity but doesn't work with Conky. Also, not with FvwmConsole.
Since root and /home are on the same partition for me, they are displayed together, otherwise I would have a different entry for /home, similar to the one for /DATA, which is my data partition to /home on the same SSD.
Here is the missing root/home

Code: Select all

${voffset 4}${color}${font Open Sans:Bold:size=12}Root and Home ${color0}${hr 3}
${font Open Sans:size=12}${color}total/use: ${fs_size /} / ${fs_used /} ${goto 230}${color5}${fs_bar 10,100 /}${color}${goto 350}Disk I/O: ${color5}${diskio /dev/nvme0n1p1}${color} ${goto 480}R: ${color5}${diskio_read /dev/nvme0n1p1}${color} ${goto 560}W: ${color5}${diskio_write /dev/nvme0n1p1}${color}  ${color}${goto 645}°C : ${color5}${hwmon 1 temp 3}${color}
ps: fs_size always shows the size of a partition not the whole ssd/hdd, which is of little interest to me because most of my ssd only has one partition and it occupies the entire space. Mi Inxi you can still see the space that all the disks have together, how much is occupied and how much is free. i think that's nice, but if you want to know that, you have to add half a dozen numbers in your head, the use of the calculator is legitimate, nowadays not everyone can do mental arithmetic :-)
Somewhere I also have a conky in which I have integrated inxi, but the same full package as with qsi. if you find the right command line, you can do a lot with inxi in conky, but not everything.

Re: Conky hard disk info  [Solved]

Posted: Thu Sep 21, 2023 8:27 am
by Mjaakko
siamhie wrote: Mon Sep 18, 2023 6:52 pm @Mjaakko The link I posted (http://ifxgroup.net/conky.htm#fs_bar) has all the conky variables regarding hard drive information that can be shown.
I checked but only for mounted partitions. Usually, for everything need sudo such as sudo fdisk -l. I spent hours searching and experimenting to get rid of inxi generated triangle characters. Found the trick. With sed, copy specified selected alpha, numeric and character symbols. This excludes garbage characters when not specified.

Code: Select all

sed 's/[^a-z  A-Z 0-9 . % ( )]//g' file.txt
Trick when using FvwmConsole:

Code: Select all

Exec inxi -b > ~/.fvwm/core/7Modules/ConkyBtn/tmp.txt

Exec grep 'Storage' ~/.fvwm/core/7Modules/ConkyBtn/tmp.txt | \ 
   sed 's/[^a-z  A-Z 0-9 . % ( )]//g' | \
   sed 's/12//g' > ~/.fvwm/core/7Modules/ConkyBtn/hdd-storage.conf
Conky

Code: Select all

${execp cat ~/.fvwm/core/7Modules/ConkyBtn/hdd-storage.conf | sed 's/  Local Storage/HDD/'}
Result:
HDD total 386.94 GIB used 322.16 GIB (83.2%)

Re: Conky hard disk info

Posted: Thu Sep 21, 2023 10:56 am
by siamhie
Mjaakko wrote: Thu Sep 21, 2023 8:27 am
siamhie wrote: Mon Sep 18, 2023 6:52 pm @Mjaakko The link I posted (http://ifxgroup.net/conky.htm#fs_bar) has all the conky variables regarding hard drive information that can be shown.
I checked but only for mounted partitions. Usually, for everything need sudo such as sudo fdisk -l.

I use blkid to find out all partitions on my system (mounted or not). sudo not required.

I spent hours searching and experimenting to get rid of inxi generated triangle characters. Found the trick. With sed, copy specified selected alpha, numeric and character symbols. This excludes garbage characters when not specified.

Code: Select all

sed 's/[^a-z  A-Z 0-9 . % ( )]//g' file.txt
Trick when using FvwmConsole:

Code: Select all

Exec inxi -b > ~/.fvwm/core/7Modules/ConkyBtn/tmp.txt

Exec grep 'Storage' ~/.fvwm/core/7Modules/ConkyBtn/tmp.txt | \ 
   sed 's/[^a-z  A-Z 0-9 . % ( )]//g' | \
   sed 's/12//g' > ~/.fvwm/core/7Modules/ConkyBtn/hdd-storage.conf
Conky

Code: Select all

${execp cat ~/.fvwm/core/7Modules/ConkyBtn/hdd-storage.conf | sed 's/  Local Storage/HDD/'}
Result:
HDD total 386.94 GIB used 322.16 GIB (83.2%)

@Mjaakko Glad you found a way to get it working. Mark your post (that worked) solved (check mark icon) so that others may find it useful.

Re: Conky hard disk info

Posted: Thu Sep 21, 2023 5:29 pm
by rasat
Thanks @Mjaakko you made it. I was following this topic with interest. Would be great to have one conky button in Fvwm. Here it is, embedded in one push button (FvwmButtons).

Image

Re: Conky hard disk info

Posted: Fri Sep 22, 2023 5:27 am
by Mjaakko
One more question, @rasat how did you get the Battery bar and percentage? Looked at different places but there are too many options and configs.

Re: Conky hard disk info

Posted: Fri Sep 22, 2023 3:51 pm
by rasat
Here is the battery syntax.

Code: Select all

${color2}${color grey}Battery:  \
${if_existing /sys/class/power_supply/BAT0/status}${voffset 1}${color6}${battery_bar 6,80 BAT0}  ${voffset -1}${color3}${battery_percent BAT0}%${endif}\
${if_existing /sys/class/power_supply/BAT1/status}${voffset 1}${color6}${battery_bar 6,80 BAT1}  ${voffset -1}${color3}${battery_percent BAT1}%${endif}