aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriamcheeseman <[hidden email]>2026-03-01 15:06:31 -0500
committeriamcheeseman <[hidden email]>2026-03-01 15:06:31 -0500
commit954e60544a1e53d37c1d0560e95864ddd93bd4df (patch)
tree22fa4834b4196cee8e5fdd6a7aad344194b0378e
parent302dac831a6b13660752f95569fc03642876cb4d (diff)
parent87b6e59b7c5893daca15457485134eb7375e1a77 (diff)
Merge branch 'master' of ssh://codeberg.org/iamcheeseman/tsarbar
-rwxr-xr-xexamplebar.sh15
-rw-r--r--src/bardata.c2
-rwxr-xr-xtsarc2
3 files changed, 14 insertions, 5 deletions
diff --git a/examplebar.sh b/examplebar.sh
index c089f7c..ff907f1 100755
--- a/examplebar.sh
+++ b/examplebar.sh
@@ -1,9 +1,18 @@
#! /bin/sh
-./tsarc create clock
-./tsarc layout -left clock
+./tsarc config font "Hack Nerd Mono:style=Regular"
+
+./tsarc create test_comp
+./tsarc set test_comp -text "Testing spaces"
+
+./tsarc create sep
+./tsarc set sep -text " | "
+
+./tsarc create date
+
+./tsarc layout -left test_comp sep date
while true; do
- ./tsarc set clock -text "`date +"%a %b %d, %r"`"
+ ./tsarc set date -text "$(date)"
sleep 1
done
diff --git a/src/bardata.c b/src/bardata.c
index 7cdca78..493e9b1 100644
--- a/src/bardata.c
+++ b/src/bardata.c
@@ -96,7 +96,7 @@ void set_config(char argv[MAX_ARGS][MAX_ARG_LEN], int argc) {
if (new_bar_height <= 0) {
fprintf(stderr, "invalid bar height %d\n", new_bar_height);
return;
- }
+ }
bar_height = new_bar_height;
}
if (strcmp(var, "font") == 0) {
diff --git a/tsarc b/tsarc
index 9be59f2..31251ef 100755
--- a/tsarc
+++ b/tsarc
@@ -1,3 +1,3 @@
#! /bin/sh
printf "%s\201" "$@" > /tmp/tsarc.pipe
-printf "\n" > /tmp/tsarc.pipe
+echo >> /tmp/tsarc.pipe