diff options
author | Michael Stapelberg <stapelberg@users.noreply.github.com> | 2016-02-01 08:53:27 +0100 |
---|---|---|
committer | Michael Stapelberg <stapelberg@users.noreply.github.com> | 2016-02-01 08:53:27 +0100 |
commit | e073cf496847173913b309a02c3d5578ddf48243 (patch) | |
tree | 7fcce456c628987240b0f85f270d46fea76ac64a /i3status.c | |
parent | 85329802b29406925bf1f1656de85daf892309f3 (diff) | |
parent | 6f4819f7a5055e5e3bbfe5ff5b6447d6e300df17 (diff) |
Merge pull request #105 from cornerman/issue_104
add separator and separator_block_width as universal module options
Diffstat (limited to 'i3status.c')
-rw-r--r-- | i3status.c | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -53,6 +53,12 @@ #define CFG_CUSTOM_MIN_WIDTH_OPT \ CFG_PTR_CB("min_width", NULL, CFGF_NONE, parse_min_width, free) +#define CFG_CUSTOM_SEPARATOR_OPT \ + CFG_BOOL("separator", 0, CFGF_NODEFAULT) + +#define CFG_CUSTOM_SEP_BLOCK_WIDTH_OPT \ + CFG_INT("separator_block_width", 0, CFGF_NODEFAULT) + /* socket file descriptor for general purposes */ int general_socket; @@ -304,6 +310,8 @@ int main(int argc, char *argv[]) { CFG_CUSTOM_ALIGN_OPT, CFG_CUSTOM_COLOR_OPTS, CFG_CUSTOM_MIN_WIDTH_OPT, + CFG_CUSTOM_SEPARATOR_OPT, + CFG_CUSTOM_SEP_BLOCK_WIDTH_OPT, CFG_END()}; cfg_opt_t path_exists_opts[] = { @@ -313,6 +321,8 @@ int main(int argc, char *argv[]) { CFG_CUSTOM_ALIGN_OPT, CFG_CUSTOM_COLOR_OPTS, CFG_CUSTOM_MIN_WIDTH_OPT, + CFG_CUSTOM_SEPARATOR_OPT, + CFG_CUSTOM_SEP_BLOCK_WIDTH_OPT, CFG_END()}; cfg_opt_t wireless_opts[] = { @@ -321,6 +331,8 @@ int main(int argc, char *argv[]) { CFG_CUSTOM_ALIGN_OPT, CFG_CUSTOM_COLOR_OPTS, CFG_CUSTOM_MIN_WIDTH_OPT, + CFG_CUSTOM_SEPARATOR_OPT, + CFG_CUSTOM_SEP_BLOCK_WIDTH_OPT, CFG_END()}; cfg_opt_t ethernet_opts[] = { @@ -329,6 +341,8 @@ int main(int argc, char *argv[]) { CFG_CUSTOM_ALIGN_OPT, CFG_CUSTOM_COLOR_OPTS, CFG_CUSTOM_MIN_WIDTH_OPT, + CFG_CUSTOM_SEPARATOR_OPT, + CFG_CUSTOM_SEP_BLOCK_WIDTH_OPT, CFG_END()}; cfg_opt_t ipv6_opts[] = { @@ -337,6 +351,8 @@ int main(int argc, char *argv[]) { CFG_CUSTOM_ALIGN_OPT, CFG_CUSTOM_COLOR_OPTS, CFG_CUSTOM_MIN_WIDTH_OPT, + CFG_CUSTOM_SEPARATOR_OPT, + CFG_CUSTOM_SEP_BLOCK_WIDTH_OPT, CFG_END()}; cfg_opt_t battery_opts[] = { @@ -354,12 +370,16 @@ int main(int argc, char *argv[]) { CFG_CUSTOM_ALIGN_OPT, CFG_CUSTOM_COLOR_OPTS, CFG_CUSTOM_MIN_WIDTH_OPT, + CFG_CUSTOM_SEPARATOR_OPT, + CFG_CUSTOM_SEP_BLOCK_WIDTH_OPT, CFG_END()}; cfg_opt_t time_opts[] = { CFG_STR("format", "%Y-%m-%d %H:%M:%S", CFGF_NONE), CFG_CUSTOM_ALIGN_OPT, CFG_CUSTOM_MIN_WIDTH_OPT, + CFG_CUSTOM_SEPARATOR_OPT, + CFG_CUSTOM_SEP_BLOCK_WIDTH_OPT, CFG_END()}; cfg_opt_t tztime_opts[] = { @@ -368,12 +388,16 @@ int main(int argc, char *argv[]) { CFG_STR("format_time", NULL, CFGF_NONE), CFG_CUSTOM_ALIGN_OPT, CFG_CUSTOM_MIN_WIDTH_OPT, + CFG_CUSTOM_SEPARATOR_OPT, + CFG_CUSTOM_SEP_BLOCK_WIDTH_OPT, CFG_END()}; cfg_opt_t ddate_opts[] = { CFG_STR("format", "%{%a, %b %d%}, %Y%N - %H", CFGF_NONE), CFG_CUSTOM_ALIGN_OPT, CFG_CUSTOM_MIN_WIDTH_OPT, + CFG_CUSTOM_SEPARATOR_OPT, + CFG_CUSTOM_SEP_BLOCK_WIDTH_OPT, CFG_END()}; cfg_opt_t load_opts[] = { @@ -382,12 +406,16 @@ int main(int argc, char *argv[]) { CFG_CUSTOM_ALIGN_OPT, CFG_CUSTOM_COLOR_OPTS, CFG_CUSTOM_MIN_WIDTH_OPT, + CFG_CUSTOM_SEPARATOR_OPT, + CFG_CUSTOM_SEP_BLOCK_WIDTH_OPT, CFG_END()}; cfg_opt_t usage_opts[] = { CFG_STR("format", "%usage", CFGF_NONE), CFG_CUSTOM_ALIGN_OPT, CFG_CUSTOM_MIN_WIDTH_OPT, + CFG_CUSTOM_SEPARATOR_OPT, + CFG_CUSTOM_SEP_BLOCK_WIDTH_OPT, CFG_END()}; cfg_opt_t temp_opts[] = { @@ -397,6 +425,8 @@ int main(int argc, char *argv[]) { CFG_CUSTOM_ALIGN_OPT, CFG_CUSTOM_COLOR_OPTS, CFG_CUSTOM_MIN_WIDTH_OPT, + CFG_CUSTOM_SEPARATOR_OPT, + CFG_CUSTOM_SEP_BLOCK_WIDTH_OPT, CFG_END()}; cfg_opt_t disk_opts[] = { @@ -408,6 +438,8 @@ int main(int argc, char *argv[]) { CFG_CUSTOM_ALIGN_OPT, CFG_CUSTOM_COLOR_OPTS, CFG_CUSTOM_MIN_WIDTH_OPT, + CFG_CUSTOM_SEPARATOR_OPT, + CFG_CUSTOM_SEP_BLOCK_WIDTH_OPT, CFG_END()}; cfg_opt_t volume_opts[] = { @@ -419,6 +451,8 @@ int main(int argc, char *argv[]) { CFG_CUSTOM_ALIGN_OPT, CFG_CUSTOM_COLOR_OPTS, CFG_CUSTOM_MIN_WIDTH_OPT, + CFG_CUSTOM_SEPARATOR_OPT, + CFG_CUSTOM_SEP_BLOCK_WIDTH_OPT, CFG_END()}; cfg_opt_t opts[] = { |