From 8e946afafb6fb4ab04c0a0cf39b41f7b41e03d26 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Mon, 20 Feb 2023 14:40:25 -0600 Subject: [PATCH] fixup some tmux configuration --- home/dot_zshenv | 1 + home/private_dot_config/zsh/conf.d/aliases.zsh | 9 +++++++++ home/private_dot_config/zsh/functions/ta | 4 ++++ 3 files changed, 14 insertions(+) create mode 100644 home/private_dot_config/zsh/functions/ta diff --git a/home/dot_zshenv b/home/dot_zshenv index e324936..afcadf6 100644 --- a/home/dot_zshenv +++ b/home/dot_zshenv @@ -12,6 +12,7 @@ export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-${HOME}/.config} export ZDOTDIR=${ZDOTDIR:-${XDG_CONFIG_HOME}/zsh} +export DOTFILES_DIR=${DOTFILES_DIR:-${HOME}/.dotfiles}) # # .zprofile diff --git a/home/private_dot_config/zsh/conf.d/aliases.zsh b/home/private_dot_config/zsh/conf.d/aliases.zsh index fca962f..22b3527 100644 --- a/home/private_dot_config/zsh/conf.d/aliases.zsh +++ b/home/private_dot_config/zsh/conf.d/aliases.zsh @@ -36,3 +36,12 @@ alias zshrc='${EDITOR:-vim} "${ZDOTDIR:-$HOME}"/.zshrc' # alias zbench='for i in {1..10}; do /usr/bin/time zsh -lic exit; done' alias zdot='cd ${ZDOTDIR:-~}' +# tmux +alias t-labbook="$DOTFILES_DIR/tmux/labbook.sh" +# source custom tmux.conf with older tmux +alias tmux="tmux -f ~/.config/tmux/tmux.conf" +alias t='tmux' +alias tn='tmux new-session' +alias tl='tmux list-sessions' + + diff --git a/home/private_dot_config/zsh/functions/ta b/home/private_dot_config/zsh/functions/ta new file mode 100644 index 0000000..2f8c0cd --- /dev/null +++ b/home/private_dot_config/zsh/functions/ta @@ -0,0 +1,4 @@ +#!/usr/bin/env zsh + +tmux attach -t "$@" || tmux new-session -s "$@" +