GitXplorerGitXplorer
l

zsh-tmux

public
10 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
7fcd703bdee9f3fed6a237d5ea92f63881945f1c

fix: fallback to 'md5 -r' if 'md5sum' is not available

llaggardkernel committed 3 years ago
Unverified
9480fe7a5d93aaa1e76f771fde7b243371847b0f

Update license

llaggardkernel committed 4 years ago
Unverified
5920fc3c2f3d7f4dfe8ce04cde422cd0a25caf6e

Release statement for v1.1.0

llaggardkernel committed 4 years ago
Unverified
ba3a7dd5696fabd11a969278c068d36a7bd016b0

Change attach behavior: don't detach others

llaggardkernel committed 4 years ago
Unverified
67c9ac23a743b6b8e36caa6a6657d7297698a673

change: replace command md5 with md5sum to support Linux

llaggardkernel committed 5 years ago
Unverified
947f6718ae8c26cce94d8f0506233197df188763

Disable aggressive-resize automatically in control mode for iTerm

llaggardkernel committed 5 years ago

README

The README file for this repository.

zsh-tmux

License: MIT

Auto start a tmux session once shell is launched. Auto name the session as directory-hash to keeps a consistent name for sessions created in the same directories, which means we could auto attach to an existing session.

Features

  • Creating/Attaching sessions automatically on shell run
  • Consistent session name for the same directory
  • Options to
    • Disable auto session creating/attaching
    • Kill shell automatically once u detach from a tmux session
    • Custom environment variable TERM for tmux commands

Installation

The only ZSH plugin manager solves the time-consuming init for nvm, nodenv, pyenv, rvm, rbenv, thefuck, fasd, etc, with its amazing async Turbo Mode.

# add it into your .zshrc
zinit ice pick'init.zsh'
zinit light laggardkernel/zsh-tmux

Update the plugin with

$ zinit update laggardkernel/zsh-tmux

The only framework does optimizations in plugins with sophisticated coding skill:

mkdir -p ${ZDOTDIR:-$HOME}/.zprezto/contrib &>/dev/null
git clone git@github.com:laggardkernel/zsh-tmux.git ${ZDOTDIR:-$HOME}/.zprezto/contrib/zsh-tmux

# or use HTTPS instead
git clone https://github.com/laggardkernel/zsh-tmux.git ${ZDOTDIR:-$HOME}/.zprezto/contrib/zsh-tmux

Settings

Auto Start

Automatically attach to an existing tmux session, or create a session once the plugin is enabled. Disable auto attaching/creating with

# global setting
NO_AUTO_TMUX=1 # enabled by default

# setting for local terminal only
zstyle ':prezto:module:tmux:auto-start' local 'no' # default 'yes'

# setting for remote terminal only
zstyle ':prezto:module:tmux:auto-start' remote 'no' # default 'no'

TERM Variable

Custom environment variable TERM for tmux commands.

zstyle ":prezto:module:tmux:term" with_256color "xterm-256color" # default screen-256
zstyle ":prezto:module:tmux:term" without_256color "xtermr" # default screen

iTerm Integration

Enable auto session creating/attaching support for Tmux CONTROL MODE in iTerm with

zstyle ":prezto:module:tmux:iterm" integrate "yes" # default 'no'

Todo

  • [ ] Length customization for hash suffix in session name
  • [ ] Setting to kill shell when detach from a session
  • [ ] Setting to kill shell when exit from a session

License

The MIT License (MIT)

Copyright (c) 2021 laggardkernel