Closed Mugworth closed 2 months ago
Hello @Mugworth,
it runs once and then disappear
Seems to work for me, as in it displays /Users/gpakosz
which is the current directory when the shell command executes.
Can you please paste the output of this command from a tmux pane?
$ tmux show -gv status-left
BTW if you want to display the path of the current pane, you should rather do something like this:
tmux_conf_theme_status_left=" ❐ #S | #{pane_current_path} "
$ tmux show -gv status-left
#[fg=#3f444a,bg=#88be65,bold] ❐ #S #[fg=#88be65,bg=#ebcb8b,none]#[fg=#1f2329,bg=#ebcb8b,none] #(cut -c3- "\\$TMUX_CONF_LOCAL" | sh -s cwd_path) #[fg=#ebcb8b,bg=#1f2329,none]
I wanted to format my cwd so that it shows ~ when path have home folder, so only pwd there is only for test.
The output of tmux show -gv status-left
looks correct to me, and nothing explains the "it runs once and then disappear" part.
You can update your .local
customization file with this
...
tmux_conf_theme_status_left=" ❐ #S | #{pretty_path #{pane_current_path}} "
...
# # /!\ do not remove the following line
# EOF
#
# # /!\ do not "uncomment" the functions: the leading "# " characters are needed
#
# pretty_path() {
# cd "$1" && dirs +0
# }
...
# "$@"
# # /!\ do not remove the previous line
Thanks for the feedback! Unfortunately, the same happens event with your snippet code:
$ tmux show -gv status-left
#[fg=#3f444a,bg=#88be65,bold] ❐ #S #[fg=#88be65,bg=#ebcb8b,none]#[fg=#1f2329,bg=#ebcb8b,none] #(cut -c3- "\\$TMUX_CONF_LOCAL" | sh -s pretty_path #{pane_current_path}) #[fg=#ebcb8b,bg=#1f2329,none]
I also tried using some of the custom variables already there, that is weather, and the same thing happens
What do you mean by "the same thing happens"?
After loading tmux bar module prints "\~", but after let's say 1 second, "\~" is disappearing like on the screenshots
At launch:
After 1 sec:
And it's stays that way
The same thing applies to the weather module
Sorry, i should write it like so at the start of the this issue.
After it has disappeared, could you please run the following from a tmux pane:
$ tmux show -gv status-left
And:
$ env | grep TMUX
Also please try to disable your TPM plugins 1 by 1 and see if there's one that rewrites status-left
and introduces a bug
Okay, as you said it was plugin, tmux-cpu to be exact. i'm new to tmux so you were additionally helpful, thank you for your time!
Hello, as in the title i made custom variable and put it into tmux_conf_theme_status_left, it runs once and then disappear, i tried changing status-interval to 1 but its still doesnt work. Here is my config
Also i use the newest HEAD, and im using tmux version 3.4