From 02d094968b4266676d61f880db897c1a57276e36 Mon Sep 17 00:00:00 2001 From: quak Date: Sun, 20 Oct 2024 23:59:42 +0200 Subject: [PATCH] added startup script for default tmux session --- bashrc/.bashrc | 1 + misc/scripts/dmux | 14 ++++++++++++++ tmux/.config/tmux/tmux.conf | 1 + 3 files changed, 16 insertions(+) create mode 100755 misc/scripts/dmux diff --git a/bashrc/.bashrc b/bashrc/.bashrc index c023204..01ddbae 100644 --- a/bashrc/.bashrc +++ b/bashrc/.bashrc @@ -37,6 +37,7 @@ export TERM="xterm-256color" # extend PATH variable # export PATH=$PATH:~/path/to/add +export PATH="${PATH}:~/dotfiles/misc/scripts/" # setup starship eval "$(starship init bash)" diff --git a/misc/scripts/dmux b/misc/scripts/dmux new file mode 100755 index 0000000..0b98bbb --- /dev/null +++ b/misc/scripts/dmux @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +SESSION='quak' +# dont forget the '-d' option, otherwise the rest of +# the commands will get executed after the session is closed +tmux new-session -d -s "$SESSION" -n "temp" +tmux new-window -t "$SESSION" -n "dotfiles" +tmux send-keys -t "$SESSION" "cd ~/dotfiles" C-m "clear" C-m +tmux new-window -t "$SESSION" -n "collection" +tmux send-keys -t "$SESSION" "cd ~/collection" C-m "clear" C-m +tmux new-window -t "$SESSION" -n "stuff" +tmux send-keys -t "$SESSION" "cd ~" C-m "clear" C-m +tmux kill-window -t "temp" +tmux attach -t "$SESSION" diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf index 0a0ccca..d04475b 100644 --- a/tmux/.config/tmux/tmux.conf +++ b/tmux/.config/tmux/tmux.conf @@ -42,4 +42,5 @@ set-option -g renumber-windows on # status bar set -g status-interval 5 +# source custom theme source ~/dotfiles/tmux/.config/tmux/zegonix.conf