summaryrefslogtreecommitdiff
path: root/src/config_swap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/config_swap.c')
-rw-r--r--src/config_swap.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/config_swap.c b/src/config_swap.c
index 9568591..c8469d5 100644
--- a/src/config_swap.c
+++ b/src/config_swap.c
@@ -22,6 +22,7 @@ void config_swap_init(struct node* n) {
n->type = CTYPE_SWAP;
n->loadfunc = &config_swap_load;
n->loadkey = &load_swap_key;
+ n->width = 12;
}
void load_swap_key(struct node* n, char* key, char* val) {
@@ -51,12 +52,10 @@ int config_swap_load(struct node* n) {
strcpy(n->label_color, C_LGREY);
if(strcmp(n->display, "bar") == 0) {
- print_bar(12, (double)(total - free) / total, n->text);
+ print_bar(n->width, (double)(total - free) / total, n->text);
} else {
sprintf(n->text, "%02d%%", percent);
}
return 0;
}
-
-

Generated by cgit