0

I have

# dotfiles/bin/withtmux.sh #!/bin/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 
4
  • 1
    I have no idea what it is you are trying to do, but your Zsh environment is populated from .zshenv, not .zshrc. Commented Feb 10, 2017 at 21:18
  • I have renamed question Commented Feb 10, 2017 at 21:32
  • Renaming it doesn't describe any better the actual problem... Commented Feb 10, 2017 at 22:19
  • @jasonwryan I have edited question too Commented Feb 11, 2017 at 9:06

2 Answers 2

1

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'

0

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.

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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.