1

Yet another Firefox customization question. But this is a good 'un, honest: Watch a lecture and take notes in iPython Notebook.

I have two different web pages on screen each in their own window (not tabs) viewing on my laptop. Since I'm using the browser based app iPython notebook in one screen and watching a video in another, naturally I wish to maximize the visible space for my video and webapp.

I'm surprised a solution doesn't come up right away in my web search, but I could be using the wrong terms.

Using: Archlinux, Firefox v30, DWM, iPython2

xtian
  • 945
  • 4
  • 14
  • 32

2 Answers2

0

I presume you want to avoid full-screen so you can see both windows. If what you really want is to see both pages, what about writing a five-line html file that opens each page in a frame. That way you can control the orientation borders, etc. in a single text file, rather than by making manual adjustments to browser windows.

Nick Russo
  • 1,169
  • 7
  • 11
  • That's true and simple enough. Let me ask since I'm not familiar with latest and greatest of HTML--can I adjust the layout from inside the browser? DWM window manager which already eliminates the borders and the title bar at top, and it allows for keyboard adjustment of window sizes--its all pretty slick. – xtian Jul 13 '14 at 23:07
  • Nothing can compete with a window manager that a user already likes -- it's a losing battle. :) In addition, traditional html frames are now frowned on, and iframes, while sort of cool, are blocked by lots of big websites, so frames may be a bit of a dead-end anyway. – Nick Russo Jul 14 '14 at 22:13
0

Do this once in Firefox:

  • Type "about:config" in the Location bar, then search for dom.disable_window_open_feature. Sort by value to see any set to true, then double click to set to false. For instance, I changed status, resizable, and location.

  • Enable pop-ups.

Each time you want to launch the two windows go to Tools->Web Developer->Web Console and paste in javascript commands like these:

window.open("http://superuser.com/questions/782653","_blank","left=0,top=0,outerheight=768,outerwidth=675,dialog,close")
window.open("http://developer.mozilla.org/en-US/docs/Web/API/Window.open","_blank","left=675,top=0,outerheight=768,outerwidth=680,dialog")

I've done this on OSX with pretty good results. I expect with DWM it'll work even better, but you may have to look through the Window.open docs to see which settings to use. Notice that many features default to "no" when the Window is opened like this, which is why I didn't use "location=no", etc.

It should be straight-forward to write an html file that will launch this js code automatically:

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script>function create_windows () {
  window.open("http://superuser.com/questions/783164","L","left=0,top=0,outerheight=768,outerwidth=675,dialog,scrollbars,close");
  window.open("http://developer.mozilla.org/en-US/docs/Web/API/Window.open","R","left=675,top=0,outerheight=768,outerwidth=680,dialog,scrollbars");
}</script>
</head>
<body onload="create_windows()">
Close this window, or reload to reset left and right windows.
</body>
</html>
Nick Russo
  • 1,169
  • 7
  • 11
  • Even after the edits to config, the window doesn't allow me to change size. I think its because DWM reduced the browser to _just_ the scrollbar and a one pixel border. Nothing to grab! @Nick Russo You responded with this solution very quickly. Do you use this trick a lot? I'm only asking because at times I've made custom local portal pages, but then got tired of maintaining them--falling back to whatever are the browsers capabilities. Just curious. – xtian Jul 16 '14 at 14:03
  • I've never used this trick! I just had time to explore after I saw how badly frames work, which would have been a great answer some years ago. I assume DWM provides a keystroke-based method for changing the window size, where grabbing an edge isn't necessary. Can you try that? (I assume you added resizable=yes during your test...) – Nick Russo Jul 16 '14 at 15:07