Add separator module
authorRyan Kes <alrayyes@gmail.com>
Sat, 30 Mar 2019 12:45:05 +0000 (13:45 +0100)
committerAaron Marcher <me@drkhsh.at>
Mon, 30 Nov 2020 20:15:13 +0000 (21:15 +0100)
Makefile
components/separator.c [new file with mode: 0644]
config.def.h
slstatus.h

index 945b5e366f325cc7f8af147131ca612ca0ccfdf1..2f93b870a91bb5c2bcebeb55f8731a5ede764690 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -21,6 +21,7 @@ COM =\
        components/num_files\
        components/ram\
        components/run_command\
+       components/separator\
        components/swap\
        components/temperature\
        components/uptime\
diff --git a/components/separator.c b/components/separator.c
new file mode 100644 (file)
index 0000000..40fec52
--- /dev/null
@@ -0,0 +1,10 @@
+/* See LICENSE file for copyright and license details. */
+#include <stdio.h>
+
+#include "../util.h"
+
+const char *
+separator(const char *separator)
+{
+    return separator;
+}
index e06be6674f47fce9c700ade1712646a9b8853fd2..0895f6a8f1141ca3fa87a3e639903fbfe44a7e09 100644 (file)
@@ -45,6 +45,7 @@ static const char unknown_str[] = "n/a";
  * ram_total           total memory size in GB         NULL
  * ram_used            used memory in GB               NULL
  * run_command         custom shell command            command (echo foo)
+ * separator           string to echo                  NULL
  * swap_free           free swap in GB                 NULL
  * swap_perc           swap usage in percent           NULL
  * swap_total          total swap size in GB           NULL
index 08f610a500d73937285de608d901558e43475fb0..b0f256473acb756feb47524f09d12dabd575c562 100644 (file)
@@ -56,6 +56,9 @@ const char *ram_used(void);
 /* run_command */
 const char *run_command(const char *cmd);
 
+/* separator */
+const char *separator(const char *separator);
+
 /* swap */
 const char *swap_free(void);
 const char *swap_perc(void);