From 089f71b64589dd8942393a0f50c733ef7d477afc Mon Sep 17 00:00:00 2001 From: devthejo Date: Sun, 27 Apr 2025 11:56:10 +0200 Subject: [PATCH] chore: fix terminator-config for dev-logs --- scripts/dev-logs | 18 ++++++------ terminator-config | 71 ++++++++++++++++++----------------------------- 2 files changed, 37 insertions(+), 52 deletions(-) diff --git a/scripts/dev-logs b/scripts/dev-logs index 0d64130..cc8e4fe 100755 --- a/scripts/dev-logs +++ b/scripts/dev-logs @@ -1,15 +1,17 @@ #!/usr/bin/env bash set -e -# 1) your “before_script” +# Get the absolute path to the terminator-config file +CONFIG_PATH="$(pwd)/terminator-config" +echo "Using config file: $CONFIG_PATH" - -# 2) launch Terminator in its own D-Bus session (so it fully registers & unregisters windows), -# background it, and redirect all of its output away from your shell: +# Launch Terminator in its own D-Bus session dbus-run-session -- terminator \ - --config ./terminator-config \ - --layout dev \ - > /dev/null 2>&1 & + --config "$CONFIG_PATH" \ + --layout dev & -# 3) remove it from your shell’s job table so it won’t ever echo anything later +# Wait a moment before disowning +sleep 1 + +# Remove it from your shell's job table disown diff --git a/terminator-config b/terminator-config index 8c3db83..2fc525d 100644 --- a/terminator-config +++ b/terminator-config @@ -10,66 +10,49 @@ suppress_multiple_term_dialog = True [layouts] [[dev]] - # root window [[[window0]]] type = Window parent = "" - - # top-level horizontal split: left vs right - [[[pane0]]] + size = 1200, 800 + [[[paned0]]] type = HPaned parent = window0 - - # left column: vertical paned into 3 rows - [[[pane_left]]] + position = 600 + [[[paned1]]] type = VPaned - parent = pane0 - # nest another VPaned under the bottom half of pane_left - [[[pane_left2]]] + parent = paned0 + position = 266 + [[[paned2]]] type = VPaned - parent = pane_left - - # right column: vertical paned into 3 rows - [[[pane_right]]] + parent = paned1 + position = 133 + [[[paned3]]] type = VPaned - parent = pane0 - # nest another VPaned under the bottom half of pane_right - [[[pane_right2]]] - type = VPaned - parent = pane_right - - # Row 1, Col 1 (db/minio logs) - [[[child0]]] - type = Terminal - parent = pane_left + parent = paned0 + position = 266 + [[[terminal1]]] + type = Terminal + parent = paned1 profile = default command = bash -lc "docker compose logs --follow --tail=10 db minio rabbitmq redis-hot-geodata redis-q-dedup keydb-cold-geodata; exec bash" - - # Row 2, Col 1 (tileserver logs) - [[[child1]]] - type = Terminal - parent = pane_left2 + [[[terminal2]]] + type = Terminal + parent = paned2 profile = default command = bash -lc "docker compose logs --follow --tail=10 tileserver-gl osrm-car osrm-foot nominatim; exec bash" - - # Row 3, Col 1 (hasura logs) - [[[child2]]] - type = Terminal - parent = pane_left2 + [[[terminal3]]] + type = Terminal + parent = paned2 profile = default command = bash -lc "docker compose logs --follow --tail=10 hasura hasura_console; exec bash" - - # Row 1, Col 2 (api/files logs) - [[[child3]]] - type = Terminal - parent = pane_right + [[[terminal4]]] + type = Terminal + parent = paned3 profile = default command = bash -lc "docker compose logs --follow --tail=10 api files web; exec bash" - - # Row 2, Col 2 (watchers/tasks logs) - [[[child4]]] - type = Terminal - parent = pane_right2 + [[[terminal5]]] + type = Terminal + parent = paned3 profile = default command = bash -lc "docker compose logs --follow --tail=10 watchers tasks; exec bash"