I have

# dotfiles/bin/withtmux.sh

exec tmux

And I want to

# i3config
# start terminal without tmux, plain zsh, work
bindsym $mod+e exec $terminal

# and with tmux, not working
bindsym $mod+Shift+e exec $terminal -e ~/.config/dotfiles/bin/withtmux.sh
  • 1
    I have no idea what it is you are trying to do, but your Zsh environment is populated from .zshenv, not .zshrc. – jasonwryan Feb 10 '17 at 21:18
  • I have renamed question – srghma Feb 10 '17 at 21:32
  • Renaming it doesn't describe any better the actual problem... – jasonwryan Feb 10 '17 at 22:19
  • @jasonwryan I have edited question too – srghma Feb 11 '17 at 9:06

In script file (script.sh)

<terminal> -e tmux

eg: terminator -e tmux

in i3 config file bindsym $mod+Shift+e exec 'bash path_to_script/script.sh'


You could try using ~/.zshenv

The shell reads ~/.zshenv first; if a login shell is used, ~/.zprofile is then read; if an interactive shell is used, commands are read from ~/.zshrc. Finally, if it is a login shell, ~/.zlogin is parsed.

See the STARTUP/SHUTDOWN FILES section of man zsh for more on this.

  • But If I specify ZSH_TMUX_AUTOSTART in zshenv - that will affect to bindsym $mod+e exec $terminal P.S. have renamed question – srghma Feb 10 '17 at 21:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.