aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorne_mene <[email protected]>2026-03-01 22:41:03 +0100
committerne_mene <[email protected]>2026-03-01 22:41:03 +0100
commit4db56d11796c1a28d0414b6db7487b08962cd6cb (patch)
treec601bd45f29ede52f783ba9244d1187d2300d420
parentacddd4e83488bbe73e3df932866d91e799564757 (diff)
parent89a3545ac90419e71405abcb7cc7e9d395883f0e (diff)
Merge branch 'master' of https://codeberg.org/iamcheeseman/tsarbar
yeah
-rwxr-xr-xexamplebar.sh5
-rw-r--r--src/bardata.c10
-rw-r--r--src/pipe.c4
3 files changed, 2 insertions, 17 deletions
diff --git a/examplebar.sh b/examplebar.sh
index 947bb69..f5a248f 100755
--- a/examplebar.sh
+++ b/examplebar.sh
@@ -5,14 +5,9 @@
./tsarc config height 16
./tsarc config padding 4
-./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 \
-right test_comp \
diff --git a/src/bardata.c b/src/bardata.c
index 02699b4..9742385 100644
--- a/src/bardata.c
+++ b/src/bardata.c
@@ -24,15 +24,9 @@ comp_t *find_comp(char *name) {
return &comps[i];
}
}
- return NULL;
-}
-void new_component(char *name) {
- comp_t* existing = find_comp(name);
- if (existing)
- return;
- strcpy(comps[comps_size].name, name);
- comps_size++;
+ strcpy(comps[comps_size++].name, name);
+ return &comps[comps_size - 1];
}
void add_component(comp_side_t side, char *name) {
diff --git a/src/pipe.c b/src/pipe.c
index fec810d..70c6a52 100644
--- a/src/pipe.c
+++ b/src/pipe.c
@@ -67,10 +67,6 @@ void make_change(char argv[MAX_ARGS][MAX_ARG_LEN], int argc) {
}
char *cmd = argv[0];
- if (strcmp(cmd, "create") == 0) {
- new_component(argv[1]);
- return;
- }
if (strcmp(cmd, "set") == 0) {
set_component(argv, argc);
}