tmux-plugins / tmux-resurrect

Persists tmux environment across system restarts.
MIT License
11.27k stars 420 forks source link

Feature request: Remember pane colors 🌈 #351

Open sunaku opened 4 years ago

sunaku commented 4 years ago

Hello,

I like to apply colors to some of my tmux panes to help visually distinguish them from normal shells. For example, I run the following command to color the pane red before tailing my system's log files therein:

$ tmux select-pane -t:. -P 'fg=#ecbcbc,bg=#41363c' && tail -F /var/log/Xorg.0.log /var/log/Xorg.1.log /var/log/dmesg.log /var/log/hashboot.log ~/.xsession-errors

However, this plugin doesn't seem to store / remember such color settings when I save my session:

$ grep tail ~/.tmux/resurrect/last
pane    0       1       :zsh    1       :*      2       :/home/sunny    0       tail    :tail -F /var/log/Xorg.0.log /var/log/Xorg.1.log /var/log/dmesg.log /var/log/hashboot.log /home/sunny/.xsession-errors

Please enhance this plugin to also remember pane color settings when saving/restoring sessions.

Thanks for your consideration.

poetaman commented 3 years ago

+1 @bruno- Was about to file this request :) Both pane & window colors.

bruno- commented 3 years ago

If the implementation is not too complex, a PR for this is welcome.

Also, maybe you can script a solution for yourself using a post-restore-all hook?

https://github.com/tmux-plugins/tmux-resurrect/blob/716b958145e2709e9fd3639ff24e1d1e4f26ff77/scripts/restore.sh#L392

pyscorcher commented 2 years ago

Would it make sense to source the complete config file after the restore?