5

This is an open feature request to Byobu author @Dustin Kirkland

Byobu can save layout, that is somewhat useful to me. But I would like to save working directories of the current layout as well. And even better, if it can re-run ssh logins or restore vim/emacs currently open files. With this feature, I can have a servers layout to login quickly to servers I usually work with, or open projectABC layout to quickly get to the project and start working from where I left off.

A quick search shows that this almost exact idea has been implemented with tmux-resurrect I just don't know how to use it with Byobu yet. One different thing, however, I want to save the layout or session with a specific name, not just one name for everything.

3
  • 1
    If you have feature requests, file them on Launchpad: bugs.launchpad.net/byobu Dustin Kirkland monitors byobu questions here, but this is not the place for bug reports or feature requests
    – muru
    Mar 28, 2017 at 8:01
  • I did not think about the bug report page on launchpad.net. Have just submitted a 'bug' report there: bugs.launchpad.net/byobu/+bug/1676770 . Never thought 'bug' and 'feature' are this close :) Anyway, I think I would like to keep this thread here for more open discussion, or find some quick solution without changing byobu itself Mar 28, 2017 at 8:12
  • If using tmux backend, do you mean something like this? Sep 30, 2018 at 7:11

1 Answer 1

1

According to this article, a Ruby gem called teamocil seems to do exactly what I was asking

https://blog.shameerc.com/2014/05/better-productivity-with-tmux-and-teamocil

I summarize the essential parts here to preserve the content:

sudo gem install teamocil

Most probably, you will have different workflows for office and personal projects. Teamocil lets you to create predefined configuration for each case and you can setup your entire workspace just by launching the teamocil. You can create the teamocil configuration like ~/.teamocil or ~/.teamocil/office.yml, ~/.teamocil/personal.yml, etc. Say for example, when I start my work at office, I'll first move to my projects folders and make an update from version control systems. In some other terminals I'll connect to different servers, and so on. With Teamocil, I'll create a configuration file office.yml for office with $ teamocil --edit office and add the following content

session:
  name: "Office"
  windows:
    - name: "Local"
      root: "~/Workplace/office"
      layout: tiled
      panes:
        - cmd: ["ls"]
          focus: true
        - cmd: ["cd application; svn up ."]
        - cmd: ["cd monitor; git pull origin master"]
    - name: "Remote"
      root: "~/Workplace/office"
      layout: tiled
      panes:
        - cmd: ["ssh -i prodkey.pem [email protected]"]
          focus: true
        - cmd: ["ssh -i testkey.pem [email protected]"]
        - cmd: ["ssh -i devkey.pem [email protected]"]

To launch this, first start a tmux session and from inside the tmux session run,

$ teamocil office
1
  • 1
    This is super advice. I like it and it is perfect for terminal minded like me. Thank you very much. I use Byobu-tmux chain in terminal with Awesome WM as desktop and it perfectly fits into my daily needs. I am very glad you posted it. Sep 23, 2021 at 10:41

You must log in to answer this question.

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