Code Monkey home page Code Monkey logo

Comments (16)

gpakosz avatar gpakosz commented on May 17, 2024

Yes this is a minor tmux annoyance imho. When a command is not ready, tmux displays a <'cmd' not ready> placeholder string.

This is going to be mitigated in tmux 2.4.

This is the first time I see it happening to systematically though. What's your value for status-interval?

from .tmux.

amosbird avatar amosbird commented on May 17, 2024

status-interval = 1
Well, I'm using tmux 2.4

from .tmux.

gpakosz avatar gpakosz commented on May 17, 2024

Does setting a higher status-interval mitigate the problem?

from .tmux.

amosbird avatar amosbird commented on May 17, 2024

no, it has no effect on this issue.

from .tmux.

gpakosz avatar gpakosz commented on May 17, 2024

I kinda expected this answer.

In fact, can you please try the gh-47 branch I just pushed?

from .tmux.

amosbird avatar amosbird commented on May 17, 2024

I did. It doesn't work though.

from .tmux.

gpakosz avatar gpakosz commented on May 17, 2024

What gh-47 does is removing leftover debug code that slowdowns the _username() function hence increasing the chances tmux reporting the command is not ready.

I'll try to find a way to factor out the ps calls inside _username() in hope I can optimize it.

In the meantime, can you please tell me more about your setup?

  • OS
  • shell
  • ~/.ssh/config peculiarities (like are you using multiplexing, etc...)
  • whatever you might find relevant

from .tmux.

amosbird avatar amosbird commented on May 17, 2024
CentOS 6.8
Fish 2.4

No fancy stuff in other configurations.

from .tmux.

gpakosz avatar gpakosz commented on May 17, 2024

And I forgot, what additions/customizations did you make to my conf?

from .tmux.

amosbird avatar amosbird commented on May 17, 2024
modified   .tmux.conf
@@ -146,6 +146,14 @@ if '[ -f ~/.tmux.conf.local ]' 'source ~/.tmux.conf.local'
 
 run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
 
+if '[ -f ~/.tmux.conf.local ]' 'source ~/.tmux.conf.local'
+
+set -g @plugin 'tmux-plugins/tpm'
+set -g @plugin 'tmux-plugins/tmux-resurrect'
+set -g @plugin 'tmux-plugins/tmux-continuum'
+set -g @continuum-restore 'on'
+
+run '~/.tmux/plugins/tpm/tpm'
 
 # ►_◄
 #

and here is my local conf

from .tmux.

gpakosz avatar gpakosz commented on May 17, 2024

First remark: I believe you can put the tpm bits at the end of your ~/.tmux.conf.local copy. This way it's easier to keep up with upstream when I push changes to .tmux.conf

Then, you do

set -g status-interval 1     # redraw status line every 10 seconds

This refreshes status line every 1 second, not 10.

While harmless,

set -g default-command /usr/bin/fish
set -g default-shell /usr/bin/fish

look superfluous to me.

Anyways, I'll try to reproduce your problem in a Virtualbox VM. In the meantime, can you please give me the output of

$ tmux show -g status-left
$ tmux show -g status-right

I'm curious to see how tpm plugins changed it if they changed it.

from .tmux.

amosbird avatar amosbird commented on May 17, 2024

let me quote what nicm (tmux maintainer) suggest,

20:36:42        nicm | it isn't an error, you have some huge big command in status-left or status-right and tmux is telling you it hasn't finished running yet so there is no output
20:37:17        nicm | you can either run master, where we use the command before substitution so lookup the output so it probably won't happen
20:37:43        nicm | or you can put your commands in a script so the actual command doesn't change when you switch pane

from .tmux.

amosbird avatar amosbird commented on May 17, 2024
❯ tmux show -g status-left
status-left "#[fg=#000000,bg=#ffff00,bold] ❐ #S #[fg=#ffff00,bg=#5f5fff,none]#[fg=#e4e4e4,bg=#5f5fff,none] ↑#{?@uptime_d, #{@uptime_d}d,}#{?@uptime_h, #{@uptime_h}h,}#{?@uptime_m, #{@uptime_m}m,} #[fg=#5f5fff,bg=default,none] "

/
❯ tmux show -g status-right
status-right "#(/home/amos/.tmux/plugins/tmux-continuum/scripts/continuum_save.sh)#(cut -c3- ~/.tmux.conf | sh -s _uptime)#(cut -c3- ~/.tmux.conf | sh -s _battery)#[fg=#080808,bg=default,none]#[fg=#8a8a8a,bg=#080808,bold]#{?pane_synchronized, SYNC,} #[fg=#8a8a8a,bg=#080808,bold]| #[fg=none]#[bg=none]#[none]#{?client_prefix,⌨,}#[fg=none]#[bg=none]#[none]#{?session_many_attached,👓,}#{?@battery_status, #{@battery_status},}#{?@battery_bar, #{@battery_bar},}#{?@battery_percentage, #{@battery_percentage},} #[fg=#8a8a8a,bg=#080808,bold]| %R #[fg=#8a8a8a,bg=#080808,bold]| %d %b #[fg=#d70000,bg=#080808,none]#[fg=#e4e4e4,bg=#d70000,none] #(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} false #D)#[fg=none]#[bg=none]#[bold,blink]#(cut -c3- ~/.tmux.conf | sh -s _root #{pane_tty} #D)#[default]#[fg=#e4e4e4,bg=#d70000,none] #[fg=#e4e4e4,bg=#d70000,none]#[fg=#000000,bg=#e4e4e4,none] #(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} false #D) "

from .tmux.

gpakosz avatar gpakosz commented on May 17, 2024

I already discussed this annoyance with him. And upcoming tmux 2.4 should mitigate it. This has been applied in commit tmux/tmux@3cf19d6

from .tmux.

amosbird avatar amosbird commented on May 17, 2024

@gpakosz ah, after upgrading to the newest commit, this issue is gone. Thanks!

from .tmux.

gpakosz avatar gpakosz commented on May 17, 2024

Good to know!

I'll merge gh-47 into master nonetheless. Happy tmuxing!

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.