Support byobu --windows to allow for different windows sets

Bug #517796 reported by Dustin Kirkland 
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
byobu
Fix Released
Wishlist
Unassigned

Bug Description

I know that the default byobu windows are in $HOME/.byobu/windows , but i was wondering if there was some sort of command line switch to get it to look at a different file for that? For instance, I have a byobu setup for a certain set of code with a bunch of windows named a certain thing, but then I have another setup for another set of code files. It would be nice to do something like:

byobu --windows $HOME/.byobu/code_files_1
byobu --windows $HOME/.byobu/code_files_2

each of which would open byobu with a bunch of windows named whatever I set them to. If something like this already exists, please forgive my ignorance. I hoped the -p switch would do it, but apparently not.

Thanks in advance!

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Sounds like a great idea, thanks for the suggestion!

Changed in byobu:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
crotty (matthew-hoopes) wrote :

Hi Dustin,

Just as a followup, I also try to name each of my byobu sessions with the -S flag. I set up a set of windows in the $HOME/.byobu/windows file, but when I do byobu -S code_files_1 , it didn't seem to respect the default windows that I had set up. If both of these flags could work together, that would be hugely useful to me (and hopefully many others). This is so when I disconnect and come back, i know which byobu session i'm dealing with (obviously).

Looooooooove byobu, thanks so much for your time and effort.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Thanks muchly for the kind words.

I need to think about this a bit more.

The window list is a file that must be sourced by screen itself.

We generally source ~/.byobu/windows, which is your list of default windows (if any).

So I think we would need screen to conditionally source some other file, which screen doesn't really support.

In the mean time, you could just use your .screenrc.

Create your own byobu wrapper, call it mybyobu, chmod it 755, drop it in ~/bin, and have it do:

#!/bin/sh
# mybyobu
[ -r "$1" ] && cat "$1" > $HOME/.screenrc
exec byobu

And run "mybyobu window_list_1", where window_list_1 is a file listing your windows. This would overwrite your .screenrc each time, and then launch byobu.

Cool?

Revision history for this message
trzmiel (konrad-garus) wrote :

This ~/.screenrc fix does not seem to be working. It is great if you use the same trick on ~/.byobu/windows. Thanks for the tip!

Changed in byobu:
status: Triaged → In Progress
Changed in byobu:
status: In Progress → Fix Committed
Changed in byobu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.