mingchaoyan
mingchaoyan

Reputation: 8616

Tmux-powerline status-interval make flicker

Mac OSX El Capitan

Tmux 1.9a

powerline https://github.com/erikw/tmux-powerline

Sometimes the status line flash, the segments will disappear and then appeare. If I config the

set-option -g status-interval=5

it seems better but that is not the real time status .

Is that the normal phenomenon?

Or maybe I should do some config to avoid this.

Upvotes: 1

Views: 1708

Answers (1)

Jim Stewart
Jim Stewart

Reputation: 17353

It sounds like one of your segments is doing something that takes a long time to update. You can disable segments to see if that helps (configuration docs). The defaults are pretty expensive, and on my older MacBook, tmux regularly sits at 5% CPU or more. Disabling uptime and anything else you don't need might help.

Here's an example config where I trimmed some of the fat from the right status (removed uptime, system load, removed the seconds from the time). This goes in ~/.config/powerline/themes/tmux/default.json:

{
  "segments": {
    "right": [
      {
        "function": "powerline.segments.common.time.date"
      },
      {
        "function": "powerline.segments.common.time.date",
        "name": "time",
        "args": {
          "format": "%H:%M",
          "istime": true
        }
      },
      {
        "function": "powerline.segments.common.net.hostname"
      }
    ]
  }
}

The default.json that ships with powerline is buried in the innards of the Python package, the location of which depends on how you installed it, your Python version, and other things (e.g. mine is at ~/.virtualenv/default/lib/python2.7/site-packages/powerline/config_files/themes/tmux/default.json). You can copy that to the ~/.config path above and modify it to your liking, or just use what I pasted.

Upvotes: 4

Related Questions