summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Kes <alrayyes@gmail.com>2019-03-30 13:45:05 +0100
committerAaron Marcher <me@drkhsh.at>2020-11-30 21:15:13 +0100
commit2b0f50d1aaf22e79272df8b3b0fe37f338ea1dae (patch)
tree755c93e266348b3ec5254f651abe84be2cfc417a
parentb14e039639ed28005fbb8bddeb5b5fa0c93475ac (diff)
downloadslstatus-2b0f50d1aaf22e79272df8b3b0fe37f338ea1dae.tar.gz
slstatus-2b0f50d1aaf22e79272df8b3b0fe37f338ea1dae.zip
Add separator module
-rw-r--r--Makefile1
-rw-r--r--components/separator.c10
-rw-r--r--config.def.h1
-rw-r--r--slstatus.h3
4 files changed, 15 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 945b5e3..2f93b87 100644
--- a/Makefile
+++ b/Makefile
@@ -21,6 +21,7 @@ COM =\
21 components/num_files\ 21 components/num_files\
22 components/ram\ 22 components/ram\
23 components/run_command\ 23 components/run_command\
24 components/separator\
24 components/swap\ 25 components/swap\
25 components/temperature\ 26 components/temperature\
26 components/uptime\ 27 components/uptime\
diff --git a/components/separator.c b/components/separator.c
new file mode 100644
index 0000000..40fec52
--- /dev/null
+++ b/components/separator.c
@@ -0,0 +1,10 @@
1/* See LICENSE file for copyright and license details. */
2#include <stdio.h>
3
4#include "../util.h"
5
6const char *
7separator(const char *separator)
8{
9 return separator;
10}
diff --git a/config.def.h b/config.def.h
index e06be66..0895f6a 100644
--- a/config.def.h
+++ b/config.def.h
@@ -45,6 +45,7 @@ static const char unknown_str[] = "n/a";
45 * ram_total total memory size in GB NULL 45 * ram_total total memory size in GB NULL
46 * ram_used used memory in GB NULL 46 * ram_used used memory in GB NULL
47 * run_command custom shell command command (echo foo) 47 * run_command custom shell command command (echo foo)
48 * separator string to echo NULL
48 * swap_free free swap in GB NULL 49 * swap_free free swap in GB NULL
49 * swap_perc swap usage in percent NULL 50 * swap_perc swap usage in percent NULL
50 * swap_total total swap size in GB NULL 51 * swap_total total swap size in GB NULL
diff --git a/slstatus.h b/slstatus.h
index 08f610a..b0f2564 100644
--- a/slstatus.h
+++ b/slstatus.h
@@ -56,6 +56,9 @@ const char *ram_used(void);
56/* run_command */ 56/* run_command */
57const char *run_command(const char *cmd); 57const char *run_command(const char *cmd);
58 58
59/* separator */
60const char *separator(const char *separator);
61
59/* swap */ 62/* swap */
60const char *swap_free(void); 63const char *swap_free(void);
61const char *swap_perc(void); 64const char *swap_perc(void);