From f3255d1f6ccfc9dc5ec0dc150f5263d46bdec17c Mon Sep 17 00:00:00 2001 From: Polesznyák Márk Date: Mon, 30 Mar 2026 18:41:01 +0200 Subject: feat(slstatus): add free disk space indicator for / --- laptop.diff | 22 ++++++++++++---------- slstatus/config.def.h | 9 +++++---- slstatus/config.h | 9 +++++---- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/laptop.diff b/laptop.diff index b5c6f56..5579ec8 100644 --- a/laptop.diff +++ b/laptop.diff @@ -98,25 +98,27 @@ diff --git a/slstatus/config.def.h b/slstatus/config.def.h index 7052e30..bf04447 100644 --- a/slstatus/config.def.h +++ b/slstatus/config.def.h -@@ -69,5 +69,7 @@ static const struct arg args[] = { - {datetime, "%s;", "%G. %B. %-e. %a"}, - {run_command, "%s ", "audio"}, - {keymap, "%s ", NULL}, +@@ -69,6 +69,8 @@ static const struct arg args[] = { + {datetime, "%s;", "%G. %B. %-e. %a"}, + {disk_free, "%s Free ", "/"}, + {run_command, "%s ", "audio"}, + {keymap, "%s ", NULL}, + {wifi_essid, "%s ", "wlan0"}, + {battery_perc, "%s%% ", "BAT0"}, - {datetime, "%s ", "%H:%M:%S"}, + {datetime, "%s ", "%H:%M:%S"}, }; diff --git a/slstatus/config.h b/slstatus/config.h index 7052e30..bf04447 100644 --- a/slstatus/config.h +++ b/slstatus/config.h -@@ -69,5 +69,7 @@ static const struct arg args[] = { - {datetime, "%s;", "%G. %B. %-e. %a"}, - {run_command, "%s ", "audio"}, - {keymap, "%s ", NULL}, +@@ -69,6 +69,8 @@ static const struct arg args[] = { + {datetime, "%s;", "%G. %B. %-e. %a"}, + {disk_free, "%s Free ", "/"}, + {run_command, "%s ", "audio"}, + {keymap, "%s ", NULL}, + {wifi_essid, "%s ", "wlan0"}, + {battery_perc, "%s%% ", "BAT0"}, - {datetime, "%s ", "%H:%M:%S"}, + {datetime, "%s ", "%H:%M:%S"}, }; diff --git a/st/config.def.h b/st/config.def.h index 444c838..620c25a 100644 diff --git a/slstatus/config.def.h b/slstatus/config.def.h index cfad904..c5dbccb 100644 --- a/slstatus/config.def.h +++ b/slstatus/config.def.h @@ -66,8 +66,9 @@ static const char unknown_str[] = "n/a"; */ static const struct arg args[] = { /* function format argument */ - {datetime, "%s;", "%G. %B. %-e. %a"}, - {run_command, "%s ", "audio"}, - {keymap, "%s ", NULL}, - {datetime, "%s ", "%H:%M:%S"}, + {datetime, "%s;", "%G. %B. %-e. %a"}, + {disk_free, "%s Free ", "/"}, + {run_command, "%s ", "audio"}, + {keymap, "%s ", NULL}, + {datetime, "%s ", "%H:%M:%S"}, }; diff --git a/slstatus/config.h b/slstatus/config.h index cfad904..c5dbccb 100644 --- a/slstatus/config.h +++ b/slstatus/config.h @@ -66,8 +66,9 @@ static const char unknown_str[] = "n/a"; */ static const struct arg args[] = { /* function format argument */ - {datetime, "%s;", "%G. %B. %-e. %a"}, - {run_command, "%s ", "audio"}, - {keymap, "%s ", NULL}, - {datetime, "%s ", "%H:%M:%S"}, + {datetime, "%s;", "%G. %B. %-e. %a"}, + {disk_free, "%s Free ", "/"}, + {run_command, "%s ", "audio"}, + {keymap, "%s ", NULL}, + {datetime, "%s ", "%H:%M:%S"}, }; -- cgit v1.2.3