ClusterSSH should open up terminals in the window it was started from
I have two monitors. Whenever I run cssh it always opens the windows on the left hand (primary) monitor, even if I run the command from the right hand workspace. It should probably default to using the window it was run from.
For modern desktop environments that can be quite annoying.
Cheers, James
Not quite as simple as that
I wrote cssh to open all the terminal windows starting as screen position 0,0 in order that all terminals could be tiled across the screen to fit as many as necessary. To limit the terminals to one screen would require working out how big that one screen is and then how big each terminal must be to fit onto that one screen. How would you define what the limit of terminal windows should be before you make use of all screens?
If you can explain to me how you see the logic working, I'll see if it can easily be implemented.
Duncs
Good points. Here's the logic I would use:
- Detect number of screens and where they start/stop.
- Determine which screen invoking cssh command is in.
- Start tiling as usual, but starting in that screen instead of 0,0.
- In the case of only one screen, or if invoked in the primary screen, or if an option is passed ("--whatever") then start at 0,0.
- If windows overflow and no longer fit properly in the one screen, then perform the action that is done when this happens under normal conditions where there isn't a secondary screen.
I think this will solve the use case where we aren't going to have too many windows, and want to keep the developer happy, while not ruining the experience for anyone used to old behaviours.
HTH!