My ~/.byobu/windows.tmux file is getting a bit complex and I would like to document it with comments.

How to insert comments in Byobu's windows.tmux file?

Using # as seen below results in a unknown command: # error message.

# Start monitors for each customer
new-session -n va /home/me/bin/monitor-1.sh;
new-window -n vk /home/me/bin/monitor-2.sh;
new-window -n vd /home/me/bin/monitor-3.sh;
new-window -n su bash ;


$ byobu --version
byobu version 5.92
tmux 1.9
  • Which version of tmux are you using? – mjturner Jul 24 '15 at 11:42
  • FYI, the byobu developer frequently answers byobu questions in AskUbuntu. Maybe asking there would help? – Cliff Oct 25 '15 at 23:19

As per the manual page

Users can create a list of windows to launch at startup in $BYOBU_CONFIG_DIR/windows and $BYOBU_CONFIG_DIR/windows.tmux. This file is the same syntax as ~/.screenrc and ~/.tmuxrc, each line specifying a window, as described in screen(1) or tmux(1)

The standard comment character in a tmux configuration file is #. Anything after a # is ignored.

# Set the default keybindings
set -g prefix C-a
unbind-key C-b
bind C-a send-prefix
  • 1
    Just tried it, and I get: unknown command: # – Nicolas Raoul Jul 24 '15 at 11:03
  • Very strange. I've just double checked the documentation and the windows.tmux format is the same as that of ~/.tmux.conf. Can you paste an excerpt of your file in the original question? – mjturner Jul 24 '15 at 11:28

You should be able to comment lines with a # character. It may be that this character has to start a line and entries like set ... # setting a new value are not allowed.

  • 1
    I've just tested, and in ~/.tmux.conf, anything after a # that's not in quotes is ignored (as expected) – mjturner Jul 24 '15 at 11:27
  • @mjturner: This question is about ~/.byobu/windows.tmux which might be different from ~/.tmux.conf. – Nicolas Raoul Jan 19 '18 at 4:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.