Code Monkey home page Code Monkey logo

Comments (9)

gpakosz avatar gpakosz commented on June 1, 2024

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} "

from .tmux.

Mugworth avatar Mugworth commented on June 1, 2024
$ 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.

from .tmux.

gpakosz avatar gpakosz commented on June 1, 2024

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

from .tmux.

Mugworth avatar Mugworth commented on June 1, 2024

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

from .tmux.

gpakosz avatar gpakosz commented on June 1, 2024

What do you mean by "the same thing happens"?

from .tmux.

Mugworth avatar Mugworth commented on June 1, 2024

After loading tmux bar module prints "~", but after let's say 1 second, "~" is disappearing like on the screenshots

At launch:
2024-05-06_14-23

After 1 sec:
image

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.

from .tmux.

gpakosz avatar gpakosz commented on June 1, 2024

After it has disappeared, could you please run the following from a tmux pane:

$ tmux show -gv status-left

And:

$ env | grep TMUX

from .tmux.

gpakosz avatar gpakosz commented on June 1, 2024

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

from .tmux.

Mugworth avatar Mugworth commented on June 1, 2024

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!

from .tmux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.