fix bash aliases to start tmux
This commit is contained in:
1 parent
eff28a6aa9
commit
0e202d4c57
1 file changed
+5
-3
+5
-3
@@ -5,18 +5,20 @@ echo "## Mache ssh key verfügbar##"
|
||||
eval "$(ssh-agent -s)"
|
||||
ssh-add ~/.ssh/id_bfds_gitea
|
||||
|
||||
echo
|
||||
echo "=============="
|
||||
echo "## Wechsel zu aktueller NixOS config Verzeichnis ##"
|
||||
echo "## run: git status"
|
||||
cd /etc/nixos/
|
||||
git status
|
||||
|
||||
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 [ -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
|
||||
tmuxxx
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user