fix bash aliases to start tmux

This commit is contained in:
Rob committed 2024-11-19 10:40:18 +00:00
1 parent eff28a6aa9
commit 0e202d4c57
1 file changed
+5 -3
+5 -3
View File
@@ -5,18 +5,20 @@ echo "## Mache ssh key verfügbar##"
eval "$(ssh-agent -s)" eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_bfds_gitea ssh-add ~/.ssh/id_bfds_gitea
echo
echo "==============" echo "=============="
echo "## Wechsel zu aktueller NixOS config Verzeichnis ##" echo "## Wechsel zu aktueller NixOS config Verzeichnis ##"
echo "## run: git status" echo "## run: git status"
cd /etc/nixos/ cd /etc/nixos/
git status git status
echo
echo "==============" echo "=============="
alias tmuxxx='tmux -f /etc/nixos/dot-files/.tmux.conf new -d -s mainsession'
alias tmuxx='tmux -f /etc/nixos/dot-files/.tmux.conf attach -t mainsession'
### !! if not running inside tmux, ask user to start tmux or create session !! ### !! if not running inside tmux, ask user to start tmux or create session !!
if [ -z "$TMUX" ]; then if [ -z "$TMUX" ]; then
alias tmuxxx='tmux -f /etc/nixos/dot-files/.tmux.conf new -d -s mainsession'
alias tmuxx='tmux -f /etc/nixos/dot-files/.tmux.conf attach -t mainsession'
if ! tmux ls &> /dev/null; then if ! tmux ls &> /dev/null; then
tmuxxx tmuxxx
fi fi