I have this command in my file ~/.tmux.conf:
setw -at weechat window-style 'bg=colour235,fg=colour223'
I expect the command to tell you to tmuxset a custom background and foreground for any window created with the name weechat, regardless of the session (i.e. in any session).
But when you run the command:
tmux -2u new -s myapps -n weechat
I get the following error:
/home/theone/.tmux.conf:17: no current [0/0]
/home/theone/.tmux.conf:17: couldn't set 'window-style'
And window-styleI installed tmux in the configuration. the file does not apply to the window weechat.
Therefore, I must click Ctrl+ cto remove the error message from the screen, and then click Ctrl+ band enter :source-file ~/.tmux.conffor the style that will be applied to the window. (To make the process less cumbersome, I configured the key binding so that when you press Ctrl+ b, then the rconfiguration file reloads.)
But I would like to avoid reloading the configuration. file in general for the applied style (s), i.e. when I run the command tmux -2u new -s myapps -n weechat, I want to tmuxcreate a window weechatwith automatically applied colors.
Can this be done? If so, how?
source
share