From 6bca92db4ddd2d3d25671aa83e74dd11aca652a8 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sat, 10 Oct 2009 15:03:01 +0000 Subject: Rather than running status-left, status-right and window title #() with popen immediately every redraw, queue them up and run them in the background, starting each once every status-interval. The actual status line uses the output from the last run. This brings several advantages: - tmux itself may be called from inside #() without causing the server to hang; - likewise, sleep or similar doesn't cause the server to block; - commands aren't run excessively often when redrawing; - commands shared by status-left and status-right, or used multiple times, will only be run once. run-shell and if-shell still use system()/popen() but will be changed over to use this too later. --- tmux.1 | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index c5ccc63d..9e2365dd 100644 --- a/tmux.1 +++ b/tmux.1 @@ -1437,6 +1437,11 @@ may contain any of the following special character sequences: The #(command) form executes .Ql command as a shell command and inserts the first line of its output. +Note that shell commands are only executed once at the interval specified by +the +.Ic status-interval +option: if the status line is redrawn in the meantime, the previous result is +used. #[attributes] allows a comma-separated list of attributes to be specified, these may be .Ql fg=colour -- cgit