Add tmuster for ivideon and update tmux conf
This commit is contained in:
parent
54fc46dd2e
commit
f3d2c44498
2 changed files with 63 additions and 0 deletions
62
scripts/tmuster_ivideon
Executable file
62
scripts/tmuster_ivideon
Executable file
|
|
@ -0,0 +1,62 @@
|
||||||
|
#!/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
|
||||||
|
# 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
|
||||||
|
# Runners window
|
||||||
|
tmux new-window -n Lazydocker -t ${IVIDEON_ROOT}
|
||||||
|
change_dir_and_activate_root_env False
|
||||||
|
tmux send-keys "lazydocker" C-m
|
||||||
|
|
||||||
|
# Git manipulation window
|
||||||
|
tmux new-window -n Project -t ${IVIDEON_ROOT}
|
||||||
|
# Go to project directory and acivate env
|
||||||
|
change_dir_and_activate_root_env False
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# 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
|
||||||
|
tmux attach -t ${IVIDEON_ROOT}:IDE
|
||||||
|
|
@ -23,6 +23,7 @@ set-option -g renumber-windows on
|
||||||
# Open panes in the same directory
|
# Open panes in the same directory
|
||||||
bind '"' split-window -v -c "#{pane_current_path}"
|
bind '"' split-window -v -c "#{pane_current_path}"
|
||||||
bind % split-window -h -c "#{pane_current_path}"
|
bind % split-window -h -c "#{pane_current_path}"
|
||||||
|
bind c new-window -c "#{pane_current_path}"
|
||||||
|
|
||||||
# set vi-mode
|
# set vi-mode
|
||||||
set-window-option -g mode-keys vi
|
set-window-option -g mode-keys vi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue