mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-17 18:45:10 +00:00
parent
1571bb1aad
commit
eb722bf30d
@ -1094,8 +1094,7 @@
|
|||||||
</term>
|
</term>
|
||||||
<listitem>Bar that shows how much space is free on a file
|
<listitem>Bar that shows how much space is free on a file
|
||||||
system. height is the height in pixels. fs is any file on
|
system. height is the height in pixels. fs is any file on
|
||||||
that file system. This uses f_bfree (as per man 2 statfs)
|
that file system.
|
||||||
if it's available, or f_bavail as a fallback.
|
|
||||||
<para /></listitem>
|
<para /></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
@ -1105,9 +1104,7 @@
|
|||||||
</command>
|
</command>
|
||||||
<option>(fs)</option>
|
<option>(fs)</option>
|
||||||
</term>
|
</term>
|
||||||
<listitem>Free space on a file system. This uses f_bfree
|
<listitem>Free space on a file system available for users.
|
||||||
(as per man 2 statfs) if it's available, or f_bavail as a
|
|
||||||
fallback.
|
|
||||||
<para /></listitem>
|
<para /></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
@ -1117,9 +1114,8 @@
|
|||||||
</command>
|
</command>
|
||||||
<option>(fs)</option>
|
<option>(fs)</option>
|
||||||
</term>
|
</term>
|
||||||
<listitem>Free percentage of space on a file system. This
|
<listitem>Free percentage of space on a file system
|
||||||
uses f_bfree (as per man 2 statfs) if it's available, or
|
available for users.
|
||||||
f_bavail as a fallback.
|
|
||||||
<para /></listitem>
|
<para /></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
@ -1149,8 +1145,7 @@
|
|||||||
</command>
|
</command>
|
||||||
<option>(fs)</option>
|
<option>(fs)</option>
|
||||||
</term>
|
</term>
|
||||||
<listitem>File system used space. This uses f_bfree (as per
|
<listitem>File system used space.
|
||||||
man 2 statfs) if it's available, or f_bavail as a fallback.
|
|
||||||
<para /></listitem>
|
<para /></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
@ -1160,9 +1155,7 @@
|
|||||||
</command>
|
</command>
|
||||||
<option>(fs)</option>
|
<option>(fs)</option>
|
||||||
</term>
|
</term>
|
||||||
<listitem>Percent of file system used space. This uses
|
<listitem>Percent of file system used space.
|
||||||
f_bfree (as per man 2 statfs) if it's available, or
|
|
||||||
f_bavail as a fallback.
|
|
||||||
<para /></listitem>
|
<para /></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
|
26
src/conky.c
26
src/conky.c
@ -4327,19 +4327,13 @@ static void generate_text_internal(char *p, int p_max_size,
|
|||||||
#ifdef X11
|
#ifdef X11
|
||||||
if(output_methods & TO_X) {
|
if(output_methods & TO_X) {
|
||||||
new_bar(p, obj->data.fsbar.w, obj->data.fsbar.h,
|
new_bar(p, obj->data.fsbar.w, obj->data.fsbar.h,
|
||||||
(int) (255 - (obj->data.fs->free ?
|
(int) (255 - obj->data.fsbar.fs->avail * 255 /
|
||||||
obj->data.fs->free :
|
obj->data.fs->size));
|
||||||
obj->data.fsbar.fs->avail) * 255 /
|
|
||||||
obj->data.fs->size));
|
|
||||||
}else{
|
}else{
|
||||||
#endif /* X11 */
|
#endif /* X11 */
|
||||||
if(!obj->data.fsbar.w) obj->data.fsbar.w = DEFAULT_BAR_WIDTH_NO_X;
|
if(!obj->data.fsbar.w) obj->data.fsbar.w = DEFAULT_BAR_WIDTH_NO_X;
|
||||||
new_bar_in_shell(p, p_max_size, (int) (100 -
|
new_bar_in_shell(p, p_max_size,
|
||||||
(obj->data.fs->free ?
|
(int) (100 - obj->data.fsbar.fs->avail * 100 / obj->data.fs->size), obj->data.fsbar.w);
|
||||||
obj->data.fs->free :
|
|
||||||
obj->data.fsbar.fs->avail) * 100 /
|
|
||||||
obj->data.fs->size),
|
|
||||||
obj->data.fsbar.w);
|
|
||||||
#ifdef X11
|
#ifdef X11
|
||||||
}
|
}
|
||||||
#endif /* X11 */
|
#endif /* X11 */
|
||||||
@ -4397,17 +4391,13 @@ static void generate_text_internal(char *p, int p_max_size,
|
|||||||
#ifdef X11
|
#ifdef X11
|
||||||
if(output_methods & TO_X) {
|
if(output_methods & TO_X) {
|
||||||
new_bar(p, obj->data.fsbar.w, obj->data.fsbar.h,
|
new_bar(p, obj->data.fsbar.w, obj->data.fsbar.h,
|
||||||
(int) ((obj->data.fs->free ?
|
(int) (obj->data.fsbar.fs->avail * 255 /
|
||||||
obj->data.fs->free :
|
obj->data.fs->size));
|
||||||
obj->data.fsbar.fs->avail) * 255 /
|
|
||||||
obj->data.fs->size));
|
|
||||||
}else{
|
}else{
|
||||||
#endif /* X11 */
|
#endif /* X11 */
|
||||||
if(!obj->data.fsbar.w) obj->data.fsbar.w = DEFAULT_BAR_WIDTH_NO_X;
|
if(!obj->data.fsbar.w) obj->data.fsbar.w = DEFAULT_BAR_WIDTH_NO_X;
|
||||||
new_bar_in_shell(p, p_max_size, (int)
|
new_bar_in_shell(p, p_max_size,
|
||||||
((obj->data.fs->free ? obj->data.fs->free :
|
(int) (obj->data.fsbar.fs->avail * 100 / obj->data.fs->size), obj->data.fsbar.w);
|
||||||
obj->data.fsbar.fs->avail) * 100 /
|
|
||||||
obj->data.fs->size), obj->data.fsbar.w);
|
|
||||||
#ifdef X11
|
#ifdef X11
|
||||||
}
|
}
|
||||||
#endif /* X11 */
|
#endif /* X11 */
|
||||||
|
Loading…
Reference in New Issue
Block a user