From da2e70729481c0fdbc187d4000b21f412e542463 Mon Sep 17 00:00:00 2001 From: t0xa Date: Thu, 21 Aug 2025 10:33:06 +0300 Subject: [PATCH] tmux: Add ivideon tmuster script --- tmux/tmuster_ivideon.sh | 65 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/tmux/tmuster_ivideon.sh b/tmux/tmuster_ivideon.sh index e69de29..3d1ab9f 100644 --- a/tmux/tmuster_ivideon.sh +++ b/tmux/tmuster_ivideon.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash + +IVIDEON_ROOT=Backend +PERSONAL_ROOT=Personal + +ROOT_PATH="/home/t0xa/Work/root" + +change_dir_and_activate_root_env(){ + # Get first argument and set True if not provided + local env_activate="${1:-True}" + + # Go to project path + tmux send-keys "cd ${ROOT_PATH}" C-m + + if [[ "$env_activate" != "False" ]]; then + tmux send-keys "source /home/t0xa/Work/root/venv/bin/activate" C-m + fi + + # Clear terminal + tmux send-keys "clear" C-m +} + +# Kill IVIDEON_ROOT if existst +tmux kill-ses -t "${IVIDEON_ROOT}" +tmux kill-ses -t "${PERSONAL_ROOT}" + +# Create detached sesssion with default IDE window +tmux new-ses -d -s ${IVIDEON_ROOT} -n IDE +tmux send-keys "nvim bootstrap.py" C-m +# Go to project path +change_dir_and_activate_root_env True +# Split IDE window in half +tmux split-window -v +change_dir_and_activate_root_env False +# Some resizing +tmux resize-pane -D 15 + +# Create additional windows +# Git manipulation window +tmux new-window -n cloud-env -t ${IVIDEON_ROOT} +# Go to project directory and acivate env +change_dir_and_activate_root_env +tmux send-keys "cd ${ROOT_PATH}/ivideon/tests" C-m +tmux send-keys "clear" C-m + +# Scripts manipulation window +tmux new-window -n Scripts -t ${IVIDEON_ROOT} +# Go to scripts directory +change_dir_and_activate_root_env False + +# Bash manipulation window +tmux new-window -n Bash -t ${IVIDEON_ROOT} +change_dir_and_activate_root_env False + +# Runners window +tmux new-window -n Lazydocker -t ${IVIDEON_ROOT} +change_dir_and_activate_root_env False +tmux send-keys "lazydocker" C-m + +# Create new session for personal use +tmux new-ses -d -s ${PERSONAL_ROOT} -n Programming +tmux new-window -n VPN -t ${PERSONAL_ROOT} + +# Attach to created workspace +t