diff options
| -rwxr-xr-x | examplebar.sh | 1 | ||||
| -rw-r--r-- | src/bardata.c | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/examplebar.sh b/examplebar.sh index 4f32786..947bb69 100755 --- a/examplebar.sh +++ b/examplebar.sh @@ -3,6 +3,7 @@ # Put any monospace font here ./tsarc config font "Liberation Mono:style=Regular:size=9" ./tsarc config height 16 +./tsarc config padding 4 ./tsarc create test_comp ./tsarc set test_comp -text "Testing spaces" diff --git a/src/bardata.c b/src/bardata.c index a289734..02699b4 100644 --- a/src/bardata.c +++ b/src/bardata.c @@ -16,7 +16,7 @@ comp_t comps[32]; size_t comps_size = 0; comp_t *comps_left[16], *comps_right[16], *comps_center[16]; size_t left_size = 0, right_size = 0, center_size = 0; -int padding = 32; +int padding = 0; comp_t *find_comp(char *name) { for (size_t i = 0; i < comps_size; i++) { @@ -130,6 +130,9 @@ void set_config(char argv[MAX_ARGS][MAX_ARG_LEN], int argc) { if (strcmp(var, "font") == 0) { load_font(argv[2]); } + if (strcmp(var, "padding") == 0) { + padding = atoi(argv[2]); + } if (strcmp(var, "background") == 0 || strcmp(var, "bg") == 0) { default_bg = parse_color(argv[2]); XSetWindowAttributes win_attr = { |
