clusterssh icon indicating copy to clipboard operation
clusterssh copied to clipboard

ClusterSSH should open up terminals in the window it was started from

Open purpleidea opened this issue 10 years ago • 2 comments

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

purpleidea avatar Apr 25 '15 02:04 purpleidea

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

duncs avatar Apr 25 '15 11:04 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!

purpleidea avatar Apr 25 '15 19:04 purpleidea