mirror of
https://github.com/zoriya/flake.git
synced 2026-08-15 18:43:42 +00:00
Create a new anonymous tmux session on new shell
This commit is contained in:
@@ -136,20 +136,18 @@ in {
|
||||
plugins = [
|
||||
"sudo"
|
||||
"git"
|
||||
"tmux"
|
||||
"kubectl"
|
||||
"copypath"
|
||||
"copyfile"
|
||||
];
|
||||
};
|
||||
|
||||
# zprof.enable = true;
|
||||
|
||||
sessionVariables = {
|
||||
YSU_MESSAGE_FORMAT = "Alias: %alias - %command";
|
||||
YSU_IGNORED_ALIASES = ''("g" "-" "~" "/" ".." "..." "...." "....." "md" "rd")'';
|
||||
DIRENV_LOG_FORMAT = "";
|
||||
ZSH_TMUX_AUTOSTART = true;
|
||||
# ZSH_TMUX_AUTONAME_SESSION = false;
|
||||
# ZSH_TMUX_DEFAULT_SESSION_NAME = "home";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
# Create a new tmux session (with a random name) and attach.
|
||||
if [[ -z "$TMUX" ]]; then
|
||||
exec tmux new-session -s "$(hexdump -n 4 -v -e '/1 "%02X"' /dev/urandom)"
|
||||
fi
|
||||
|
||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user