Closed naturedamends closed 1 year ago
Hello @naturedamends 👋
I'm sorry I have no idea what's going on. Please,
README.md
From there, we'll be able to figure it out.
BTW what's this _zsh_tmux_plugin_run
window title?
@gpakosz
Then follow the manual installation instructions listed in
I've tried my best
Make sure you have no tmux procress running
I can confirm there was no existing sessions.
This is a fresh container, created with a docker file. I'll try to create a minimal docker file that produces the same, since the image i'm using has some stuff in there I don't want to export publicly.
It was working in this docker container which Is why i'm not understanding. The only thing that has changed is i've installed zsh and oh-my-zsh
BTW what's this
_zsh_tmux_plugin_run
window title?
Not sure, it may be related to Iterm Tmux intergration oh-my-zsh, however I was expecting that to work out of the box
https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/tmux/tmux.plugin.zsh
: ${ZSH_TMUX_CONFIG:=$HOME/.tmux.conf}
# Wrapper function for tmux.
function _zsh_tmux_plugin_run() {
if [[ -n "$@" ]]; then
command tmux "$@"
return $?
fi
local -a tmux_cmd
tmux_cmd=(command tmux)
[[ "$ZSH_TMUX_ITERM2" == "true" ]] && tmux_cmd+=(-CC)
[[ "$ZSH_TMUX_UNICODE" == "true" ]] && tmux_cmd+=(-u)
# Try to connect to an existing session.
if [[ -n "$ZSH_TMUX_DEFAULT_SESSION_NAME" ]]; then
[[ "$ZSH_TMUX_AUTOCONNECT" == "true" ]] && $tmux_cmd attach -t $ZSH_TMUX_DEFAULT_SESSION_NAME
else
[[ "$ZSH_TMUX_AUTOCONNECT" == "true" ]] && $tmux_cmd attach
fi
# If failed, just run tmux, fixing the TERM variable if requested.
if [[ $? -ne 0 ]]; then
if [[ "$ZSH_TMUX_FIXTERM" == "true" ]]; then
tmux_cmd+=(-f "$_ZSH_TMUX_FIXED_CONFIG")
elif [[ -e "$ZSH_TMUX_CONFIG" ]]; then
tmux_cmd+=(-f "$ZSH_TMUX_CONFIG")
fi
if [[ -n "$ZSH_TMUX_DEFAULT_SESSION_NAME" ]]; then
$tmux_cmd new-session -s $ZSH_TMUX_DEFAULT_SESSION_NAME
else
$tmux_cmd new-session
fi
fi
if [[ "$ZSH_TMUX_AUTOQUIT" == "true" ]]; then
exit
fi
}
BTW what's this
_zsh_tmux_plugin_run
window title?
Running
command tmux
Produces the expected output. 🥇 thanks. Not sure if this is upstream. But feel free to close 👍
Can confirm changing your config variable before oh-my-zsh is loaded works
╰─⠠⠵ echo "$ZSH_TMUX_CONFIG"
/home/natured/.config/tmux/tmux.conf
╭─natured at trusty in ~/repos/workspace/dotfiles on feature/staging✔ 23-05-08 - 17:05:16
╰─⠠⠵ tmux
@gpakosz https://github.com/gpakosz/.tmux/pull/648 here's a pr if you want to merge it. Keep up the good work.
Setting $ZSH_TMUX_CONFIG
in ~/.zshrc
doesn't work. You will have to set this env var in your ~/.zshenv
file. See: https://zsh.sourceforge.io/Intro/intro_3.html?ref=zerotohero.dev
# ZSH Config Vars
export ZSH_TMUX_CONFIG="$XDG_CONFIG_HOME/tmux/tmux.conf"
I faced a very similar problem.
tmux -V
tmux 3.3a
I have zsh
as a default shell, oh-my-zsh
is installed too, but without tmux
plugin. I followed the instructions and installed oh-my-tmux
in the ~/.config/tmux
folder. Unfortunately, it doesn't work out of the box. Isn't there missing some steps in the instructions?
It looks like it is necessary to create a soft link for the ~/.tmux.conf
file or set TMUX_CONF
and TMUX_CONF_LOCAL
to the ~/.config/tmux/tmux.conf
and ~/.config/tmux/tmux.conf.local
correspondently.
I faced a very similar problem.
tmux -V tmux 3.3a
I have
zsh
as a default shell,oh-my-zsh
is installed too, but withouttmux
plugin. I followed the instructions and installedoh-my-tmux
in the~/.config/tmux
folder. Unfortunately, it doesn't work out of the box. Isn't there missing some steps in the instructions?It looks like it is necessary to create a soft link for the
~/.tmux.conf
file or setTMUX_CONF
andTMUX_CONF_LOCAL
to the~/.config/tmux/tmux.conf
and~/.config/tmux/tmux.conf.local
correspondently.
Tell the plug-in about your config location? https://github.com/gpakosz/.tmux/pull/648m
I identified the root cause of my issue. I created an empty ~/.tmux.conf
and missed that completely. When attempting to apply the correct tmux configuration file located in any other than the home directory it has no effect. This was due to the TMUX_CONF
environment variable being set to the existing ~/.tmux.conf
file. So, I needed to remove the ~/.tmux.conf
file first.
Sorry for bothering you.
this is ran inside a docker container, ubuntu:latest. i've seen it work, not sure what's happened.
Its not working even if I link tmux.conf to ~/.tmux.conf
setup script:
So i'm just left with the default
I can force it to use the config by passing it path as a argument via the
tumx -f
flag. So it works fine.If i source-file I get the following
I have added to the user conf section of the .local