Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launched terminals span width of multiple monitors #1

Closed
GoogleCodeExporter opened this issue Mar 3, 2015 · 15 comments
Closed

Launched terminals span width of multiple monitors #1

GoogleCodeExporter opened this issue Mar 3, 2015 · 15 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Have 2+ monitors
2. Run csshx

What is the expected output? What do you see instead?
I would expect the terminals to take up real estate on a single screen.
They instead span the width of all monitors.

What version of the product are you using? On what operating system?
0.56 on Mac OS 10.5.6.

Please provide any additional information below.
This is being done on one of the new Mac Minis, which have dual monitor
support.

Original issue reported on code.google.com by brent.bl...@gmail.com on 12 Mar 2009 at 2:16

@GoogleCodeExporter
Copy link
Author

For an immediate work-around, you can use the "screen_bounds" setting in your 
.csshrc
to force windows onto one screen. 

<screen_bounds> The bounding area of the screen to use for arranging the 
terminal windows. Default is the actual screen size. Format is:
    { origin_x, origin_y, width, height }

I currently detect the bounds by calling the applescript: 
    tell application "Finder" to return bounds of window of desktop

When I can get hold of a dual monitor setup - I'll see if I can find a better 
query
to run.

Ideally, I would like to implement a "--screen=N" flag to the code so you can 
specify
the screen to use.

Original comment by gavin.brock on 13 Mar 2009 at 4:56

@GoogleCodeExporter
Copy link
Author

On further investigation, I can't see a self-contained way of getting the real 
screen
resolutions of multiple displays. AFAIK There is no Apple Script call for this. 

Using perlobjcbridge, I can query NSScreen from AppKit, but there is no 
build-in way
to decode the NSRect struct that is returned. Probably it is possible with some
clever use of pack().

It may also be possible to parse the "description" as a string, but this is 
10.5 only
and liable to break.

Original comment by gavin.brock on 17 Mar 2009 at 1:52

  • Added labels: Usability

@GoogleCodeExporter
Copy link
Author

I did a little bit of looking around and basically came to the same conclusion 
about
the AppleScript calls. Any ideas about how you'd like to provide this 
functionality?
I wouldn't have much issue with it being something that's statically defined

Original comment by brent.bl...@gmail.com on 17 Mar 2009 at 3:43

@GoogleCodeExporter
Copy link
Author

Did you manage to get the screen_bounds setting in .csshrc to work for you? That
should allow you to force csshX to use only a certain area of the screen.

Original comment by gavin.brock on 7 Apr 2009 at 1:15

@GoogleCodeExporter
Copy link
Author

Would this help?

/usr/sbin/system_profiler SPDisplaysDataType

Original comment by xoph...@gmail.com on 8 Apr 2009 at 11:03

@GoogleCodeExporter
Copy link
Author

xopherg: Yes 'SPDisplaysDataType' is a great start. (I always underestimate
system_profiler!) 

I will have to see how it behaves if the monitors are arranged oddly (i.e. 
anything
other than side by side, aligned top).

Thanks

Original comment by gavin.brock on 8 Apr 2009 at 11:19

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

I have a 1200 wide x 1600 high monitor on the left and my laptop display on the
right, 1280 wide x 800 high. They are bottom aligned. The menubar is on the 
laptop
screen (right).

Applescript desktop bounds reports:

{-1200, -800, 1280, 800}

Profiler outputs:

% /usr/sbin/system_profiler SPDisplaysDataType                        
Graphics/Displays:

    Intel GMA X3100:

      Chipset Model: GMA X3100
      Type: Display
      Bus: Built-In
      VRAM (Total): 144 MB
      Vendor: Intel (0x8086)
      Device ID: 0x2a02
      Revision ID: 0x0003
      Displays:
        Color LCD:
          Display Type: LCD
          Resolution: 1280 x 800
          Depth: 32-bit Color
          Built-In: Yes
          Core Image: Hardware Accelerated
          Main Display: Yes
          Mirror: Off
          Online: Yes
          Quartz Extreme: Supported
        DELL 2001FP:
          Resolution: 1200 x 1600 @ 60 Hz
          Depth: 32-bit Color
          Core Image: Hardware Accelerated
          Mirror: Off
          Online: Yes
          Quartz Extreme: Supported
          Rotation: Supported

% /usr/sbin/system_profiler SPDisplaysDataType | grep 'Resolution'    
          Resolution: 1280 x 800
          Resolution: 1200 x 1600 @ 60 Hz


Original comment by xoph...@gmail.com on 9 Apr 2009 at 12:38

@GoogleCodeExporter
Copy link
Author

I think I can do this properly with calls to the AppKit frameworks.

Have a look at:

http://csshx.googlecode.com/svn/trunk/csshX

This should accept a "--screen=x" parameter where x is the screen id 
(0,1,2,etc) that
you want to use. 

It will also take into account the existence, or not, of the dock.

Should be ok on 10.4 and 10.5, but I haven't tested on multiple monitors - 
don't have
one to hand, so would appreciate if you could let me know how you get on.

Original comment by gavin.brock on 9 Apr 2009 at 7:19

  • Added labels: Priority-High
  • Removed labels: Priority-Medium

@GoogleCodeExporter
Copy link
Author

Tested to work on two monitors in various configurations.

Added one minor fix to handle negative relative positions.

Original comment by gavin.brock on 9 Apr 2009 at 12:08

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Issue 6 has been merged into this issue.

Original comment by gavin.brock on 9 Apr 2009 at 2:12

@GoogleCodeExporter
Copy link
Author

Looks good on 10.5.6, 2x 1680x1050 monitors side-by-side. Thanks for the fix 
Gavin

Original comment by brent.bl...@gmail.com on 9 Apr 2009 at 2:26

@GoogleCodeExporter
Copy link
Author

Works really well for me.  Plus, if I want the terminals open in the current 
screen, I don't even need to use "--
screen".  Sweet.  Thanks.

Original comment by shub...@gmail.com on 9 Apr 2009 at 2:46

@GoogleCodeExporter
Copy link
Author

Fix was released in 
http://code.google.com/p/csshx/downloads/detail?name=csshX-0.57.tgz

Original comment by gavin.brock on 10 Apr 2009 at 12:04

  • Changed state: Done

@GoogleCodeExporter
Copy link
Author

The new one (http://csshx.googlecode.com/svn/trunk/csshX) works great. Thanks!

Original comment by xoph...@gmail.com on 10 Apr 2009 at 12:25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant