4

I let Tmux let me know when contents of non-current window changes.

setw -g monitor-activity on
set -g visual-activity on  

The only problem is, the color of it sucks. I'd like to change the color of fg/bg from grey to something that blends in better. How can I do that (what are the options names)?

2 Answers 2

8

The activity and silence monitoring functions share a set of display configuration options:

  • window-status-activity-attr
  • window-status-activity-fg
  • window-status-activity-bg

The default value of the “attr” is reverse, so you may want to set it to something else if you are also changing the colors (so that …-fg will set the effective foreground color instead of being reversed into the effective background color); see the list of attribute names in the man page description of message-attr.

The colors default to default, which just leaves at whatever they were last set to while building the status line; see the list of colors in the man page description of message-bg.

set-option -gw window-status-activity-attr bold
set-option -gw window-status-activity-bg black
set-option -gw window-status-activity-fg red

The other “alerts” (content monitoring and the bell) have their own display options (replace activity with content or bell in the option name).

0
5

Actually, in later tmux versions (I am seeing this on 1.9a), it looks like there's been a change in the way styles are set.

While @ChrisJohnsen's answer still applies (and my tmuxconfig certainly still uses these statements) the new way to do this as explained by the manage is to use *-style rather than the triplet of *-attr *-bg *-fg, so you can specify the style for such a window option with a single statement rather than three.

message-command-style style
    Set status line message command style, where style is a
    comma-separated list of characteristics to be specified.

    These may be `bg=colour' to set the background colour,
    `fg=colour' to set the foreground colour, and a list of
    attributes as specified below.

    The colour is one of: black, red, green, yellow, blue,
    magenta, cyan, white, aixterm bright variants (if sup-
    ported: brightred, brightgreen, and so on), colour0 to
    colour255 from the 256-colour set, default, or a hexadec-
    imal RGB string such as `#ffffff', which chooses the
    closest match from the default 256-colour set.

    The attributes is either none or a comma-delimited list
    of one or more of: bright (or bold), dim, underscore,
    blink, reverse, hidden, or italics, to turn an attribute
    on, or an attribute prefixed with `no' to turn one off.

    Examples are:

          fg=yellow,bold,underscore,blink
          bg=black,fg=default,noreverse

    With the -a flag to the set-option command the new style
    is added otherwise the existing style is replaced.

So this declaration would then be:

set-option -gw window-status-activity-style fg=red,bg=black,bold

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .