firemodels / smv

Smokeview
Other
45 stars 177 forks source link

Start Smokeview window on active monitor #1825

Open rmcdermo opened 7 months ago

rmcdermo commented 7 months ago

Not sure if this is possible to control, but now that my "main" monitor is a laptop and usually pushed off to the side, I have to go hunt for my Smokeview window whenever I launch a case from a terminal on another monitor. Wonder if it is possible to start Smokeview on the monitor where the terminal is located? Not urgent--rainy day enhancement request.

gforney commented 7 months ago

Ir is raining, ill take a look.

On Wed, Mar 6, 2024, 5:01 PM Randy McDermott @.***> wrote:

Not sure if this is possible to control, but now that my "main" monitor is a laptop and usually pushed off to the side, I have to go hunt for my Smokeview window whenever I launch a case from a terminal on another monitor. Wonder if it is possible to start Smokeview on the monitor where the terminal is located? Not urgent--rainy day enhancement request.

— Reply to this email directly, view it on GitHub https://github.com/firemodels/smv/issues/1825, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC6UCRWMP4NNI4LISLS6BA3YW6G2VAVCNFSM6AAAAABEJ3NI4GVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE3TENJRGEYTIMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

gforney commented 7 months ago

don't know how to control which monitor to display a window at startup but I can control the screen coordinates where a window is placed. on a PC with a multi-montitor setup the screen coordinates of all monitors are merged into one large virtual montitor so I can place a window anywhere within this space. more specifically

I added -x0 and -y0 command line parameters to specify the smokeview window coordinates used to place the window at startup.

  1. download and install smokeview from https://github.com/firemodels/test_bundles/releases/tag/SMOKEVIEW_TEST
  2. open up a case.
  3. move window to where you would like it to startup
  4. Select Show/Hide>Screen>show screen origin menu item smokeview will output something like the following to the screen screen origin: (691, 85)
  5. create a smokeview alias in your .bashrc (on a Linux or mac computer) adding something like
    -x0 691 -y0 85 to what you had before (choosing two numbers from your output). on a PC select save screen origin from Show/Hide>screen menu item. note, for linux and mac computers if you'll need to use different alias for each monitor configuration
rmcdermo commented 7 months ago

OK, I'll play with this once the test version is available. This is a step in the right direction. Thanks for the efforts. The point in the long run is to first figure out which display Smokeview is being launched from (an explorer on Windows or a terminal on linux/macOS), determine the extents of that monitor, and then set the x0 and y0 for smv startup dynamically. If I set my x0 and y0 to be my middle monitor at my desk, then it will not show up when I am just using my laptop at home, or else I'd have to have two versions (aliases) of Smokeview.

gforney commented 7 months ago

yes, if -x0 -y0 works for multi monitors, you'll need to have 2 aliases. don't see a way to determine which monitor a command shell resides in when you launch smokeview

On Thu, Mar 7, 2024 at 9:49 AM Randy McDermott @.***> wrote:

OK, I'll play with this once the test version is available. This is a step in the right direction. Thanks for the efforts. The point in the long run is to first figure out which display Smokeview is being launched from (an explorer on Windows or a terminal on linux/macOS), determine the extents of that monitor, and then set the x0 and y0 for smv startup dynamically. If I set my x0 and y0 to be my middle monitor at my desk, then it will not show up when I am just using my laptop at home, or else I'd have to have two versions (aliases) of Smokeview.

— Reply to this email directly, view it on GitHub https://github.com/firemodels/smv/issues/1825#issuecomment-1983666721, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC6UCRWUUIJBXTFGJXO5TFLYXB465AVCNFSM6AAAAABEJ3NI4GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBTGY3DMNZSGE . You are receiving this because you commented.Message ID: @.***>

-- Glenn Forney

gforney commented 7 months ago

when you have time, let's use the show screen option to see what smokeview thinks theupper left and lower right coordinates of all your monitors are. I might be able to do something dynamically that would work for your two use cases

rmcdermo commented 7 months ago

This works! Thanks

rmcdermo commented 7 months ago

Actually, just testing this some more... when you open a dialog the window shows up in the original position, not relative to the new origin. For example, right-click >> Motion/View/Render, and the dialog shows up on the original monitor.

gforney commented 7 months ago

I'll take a look

On Fri, Mar 15, 2024 at 2:59 PM Randy McDermott @.***> wrote:

Actually, just testing this some more... when you open a dialog the window shows up in the original position, not relative to the new origin. For example, right-click >> Motion/View/Render, and the dialog shows up on the original monitor.

— Reply to this email directly, view it on GitHub https://github.com/firemodels/smv/issues/1825#issuecomment-2000274968, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC6UCRRRWJ2XNR3FM6CUK5DYYNAJ3AVCNFSM6AAAAABEJ3NI4GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBQGI3TIOJWHA . You are receiving this because you commented.Message ID: @.***>

-- Glenn Forney