diff options
| author | ne_mene <[email protected]> | 2026-03-01 22:40:54 +0100 |
|---|---|---|
| committer | ne_mene <[email protected]> | 2026-03-01 22:40:54 +0100 |
| commit | acddd4e83488bbe73e3df932866d91e799564757 (patch) | |
| tree | 28416b365d03bccd50e8e5aebf9782adb4660330 | |
| parent | 5994a370b9279b53be82bc97965e4527d2a41f81 (diff) | |
padding config
| -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 = { |
