-
Notifications
You must be signed in to change notification settings - Fork 234
-
Is it possible for tmuxp to work with a tmux config in a "nonstandard" location? I like to keep my configs in XDG_CONFIG_HOME, which tmux does not seem to support (srsly). Aliasing tmux to tmux -f $XDG_CONFIG_HOME/tmux/config in the shell means that tmuxp does not read the tmux config. Also, creating a wrapper script called tmux that basically does the same thing as the alias,
#!/bin/bash tmux -f "${XDG_CONFIG_HOME}"/tmux/config "${@}"
causes tmuxp to infinitely recurse tmux subprocesses, whereas tmux itself works fine with this mechanism.
I spent about 15 minutes reading through the source code and I couldn't find where to make any changes for this issue/feature. With a suggestion, I am willing to implement this myself.
Beta Was this translation helpful? Give feedback.
All reactions
@jfindlay This is a really good catch. As of 1.6 / 1.7 master:
-
tmuxpcommands (e.g.tmuxp load) don't pass through the-f(tmux config file) totmux.tmuxpalready passes through-2(256 colors),-8,-L(socket_name),-S(socket_path) totmux
I spent about 15 minutes reading through the source code and I couldn't find where to make any changes for this issue/feature. With a suggestion, I am willing to implement this myself.
We'd do it in cli.py in command_load (CLI entrypoint) and load_workspace.
We can accept an -f / --file as an arg. We'd need to do this at t = Server so the libtmux client used refers to the tmux config file:
Lines 918 to 950 in 0d6a0eb
Replies: 1 comment 8 replies
-
@jfindlay This is a really good catch. As of 1.6 / 1.7 master:
tmuxpcommands (e.g.tmuxp load) don't pass through the-f(tmux config file) totmux.tmuxpalready passes through-2(256 colors),-8,-L(socket_name),-S(socket_path) totmux
I spent about 15 minutes reading through the source code and I couldn't find where to make any changes for this issue/feature. With a suggestion, I am willing to implement this myself.
We'd do it in cli.py in command_load (CLI entrypoint) and load_workspace.
We can accept an -f / --file as an arg. We'd need to do this at t = Server so the libtmux client used refers to the tmux config file:
Lines 918 to 950 in 0d6a0eb
Lines 979 to 994 in 0d6a0eb
Lines 575 to 584 in 0d6a0eb
The good news is, Server() accepts a config_file: https://github.com/tmux-python/libtmux/blob/6c7c08e718a654f653e0c4388df32e048aa3e445/libtmux/server.py#L79-L94
Do you want to give this a shot @jfindlay? It may be a good first issue
Beta Was this translation helpful? Give feedback.
All reactions
-
Token credit: #665. The real win here though, is getting me to think about tmuxp code which increases the probability I will contribute again in the future.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
If you try one of these, how's that?
Beta Was this translation helpful? Give feedback.
All reactions
-
The real win here though, is getting me to think about tmuxp code which increases the probability I will contribute again in the future.
And that's good with me!
Beta Was this translation helpful? Give feedback.
All reactions
-
* https://pypi.python.org/pypi/tmuxp/1.6.5 * https://pypi.python.org/pypi/tmuxp/1.7.1If you try one of these, how's that?
I have verified the new flag works with both versions.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
Excellent
Beta Was this translation helpful? Give feedback.