diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-06-16 18:07:41 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-06-16 18:07:41 +0900 |
| commit | 2c6d5ce3567b404a25cdcb1e385eb188742311ab (patch) | |
| tree | 90ff5f4cde9d60ff230cfcdd1cc5459c94200e22 /ar/.config/zsh/.zshrc | |
| parent | 534dbf3c4000be0b1386e5faa5aaefef52dcb292 (diff) | |
modified firefox/vimium-options.json, modified zsh/.zshrc, modified bin/browserprofile
Diffstat (limited to 'ar/.config/zsh/.zshrc')
| -rw-r--r-- | ar/.config/zsh/.zshrc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ar/.config/zsh/.zshrc b/ar/.config/zsh/.zshrc index 2cbb3a6..9a7c7da 100644 --- a/ar/.config/zsh/.zshrc +++ b/ar/.config/zsh/.zshrc @@ -112,3 +112,14 @@ zstyle ':fzf-tab:*' switch-group ',' '.' # switch group using `,` and `.` [ -f "${XDG_CONFIG_HOME:-${HOME}/.config}/shell/shortcutrc" ] && source "${XDG_CONFIG_HOME:-${HOME}/.config}/shell/shortcutrc" [ -f "${XDG_CONFIG_HOME:-${HOME}/.config}/shell/shortcutenvrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutenvrc" [ -f "${XDG_CONFIG_HOME:-${HOME}/.config}/shell/zshnameddirrc" ] && source "${XDG_CONFIG_HOME:-${HOME}/.config}/shell/zshnameddirrc" + +if command -v tmux >/dev/null 2>&1 && [ -z "$TMUX" ]; then + terminal_count=$(pgrep -u "$USER" -x "${TERMINAL:-st}" | wc -l) + if [ "$terminal_count" -le 1 ]; then + if ! tmux has-session 2>/dev/null; then + exec tmux new-session -s code + else + exec tmux attach-session + fi + fi +fi |
