+3
Planned

Multiple Windows and other ideas

Cleroth 11 jaar geleden bijgewerkt door johny mark 6 jaar geleden 5

First off, I would like to congratulate you on the latest update. I was actually on the verge of uninstalling Sidewise right before that happened, due to the large amount of glitches I kept experiencing, which I reckon was partly due to my way of using Chrome. So far it seems to be working fine, but there are still quite a lot of things which would make Sidewise a much better tool.

I use Chrome very extensively, and in a way probably only a very low percentage of people do. Sidewise helped quite a bit, but there are still a few things that hinder my workflow. Namely, the issues with multiple windows. I find that Sidewise doesn't handle multiple windows in a very efficient way.


Firstly, having several windows—hibernated or not—causes Sidewise to become rather cluttered. I was happy to realize that I can change the CSS to my liking, and came up with the following, by reducing overall sizes, and more so on the hibernated windows (they don't really need to be big as they are rarely accessed): http://i.imgur.com/07ZW5.png

Though this usually a matter of preference, I prefer a more compact UI as it provides me with a broader view on everything. Obviously for a maximum of around 10-15 tabs (which is what most people use), a more 'comfortable'-sized UI would look better. Being able to trigger between a compact or comfortable UI would be a good idea, similar to the GMail UI.

Now, the biggest problem with having multiple windows is getting back to Chrome from a different application. One way to do it is to click on the Sidewise window first, and then choose the desired tab. This isn't the best solution as it involves multiple actions, as well as having to sift through the entire list of windows and tabs. Using the previous screenshot as an example: to get back to my last active tab on the second window, I would either have to click the window itself on the taskbar, or find it in Sidewise (which would be rather hard, because Sidewise doesn't show the actual active tab on each window, just the last active tab). I usually end up sifting through my Chrome windows, trying to find the right window so I can find the tab I'm looking for, which is a slow process. One thing I would love to have which would help a lot with this is to rename the title of each Chrome window to the title they possess in Sidewise, rather than using the active tab as its name. This would make changing between Chrome and other applications much easier.

Now for the biggest issue I have with Sidewise... When switching between Chrome and other applications, if I click on a window which is not the main Chrome window, then Sidewise will not pop up. This is obviously quite irritating and usually ends up with me using the normal Chrome tabs because making Sidewise pop up would involve more clicks than needed. I assume the reason this isn't fixed is because of Chrome's limited API.

One way I thought of solving this is to make a Windows Application which will scan the topmost window periodically; if the window is a Chrome window (other than Sidewise), bring the Sidewise window to the front. I am pretty sure that would work, and am actually going to proceed to code that program after finishing this post. Using an external program is obviously not the best solution to this, but quite honestly in my opinion it doesn't really matter as long as the desired result is achieved. As for security issues, I could simply make the program opensource and put it on github. I will keep you up to date with how this goes.

Antwoord

Antwoord
Planned

Thank you for your thoughtful post and screenshot. It's always helpful to me to see how people are actually using Chrome/Sidewise. To your specific points:


  • Compact UI: Theming support is planned to be added in the medium-term, and I will include a "Compact" theme when that is done. As a partial "until then" solution, one thing you could do is press Ctrl+- or Ctrl+wheeldown to lower the zoom-level of everything in the sidebar, which produces a result that is fairly close to your custom-CSS solution. Chrome appears to remember the chosen zoom level for the sidebar between restarts.

  • Window titling: to clarify, are you looking for Sidewise to set the title of each Chrome window to match the associated window-row's label, e.g. "Maya MEL"?

    Unfortunately this is probably not feasible, because Chrome itself sets the window titles to match the last-active-tab's title in each window, and does not give extensions a mechanism to explicitly set/override the window title. To implement this, then, would require retitling the last active tab's title in each window, which could make finding a desired tab by title more confusing, even if Sidewise were to visually retain the correct 'actual' title for each page row in the tree.

    One thing you can do currently is to click a window row in the sidebar to focus that window, without changing which tab is focused within that window. But it sounds like this probably isn't quite the solution you're after.

    Do you think showing a "secondary" focus effect on page rows which were focused within non-focused windows be a viable solution? To see what I mean, focus a page row which is a child of another page row in the tree, then collapse the parent page row; you should then see a "dashed border" effect on the parent row which is meant to indicate that  one of its non-visible children rows has the focus. Perhaps the same kind of effect could be applied to the last-focused tab in non-focused windows.

  • Raise Sidewise when focusing any Chrome window: I think this is actually something that could be done internally by Sidewise. Currently, it is set up so that it only raises the sidebar when the dock window gets focused; this was done intentionally because I found that with multiple windows potentially located across multiple monitors, having the sidebar  raised after any Chrome-window-focus could be unexpected or annoying in many use cases. But it would be a pretty simple change to Sidewise to add a "Raise the sidebar when any Chrome window is focused" option, which would be subordinate to the "Keep Sidewise visible next to the dock window" option. Would this do what you're looking for?

Until I get to implementing this last one, you are of course more than welcome to create an external application to get the results you seek. In that vein, you might like to check out the AutoHotkey script I am working on, which addresses the alt-tab and Sidewise-icon-in-taskbar issues that affect Sidewise currently. 
I think it would be pretty simple to add your desired functionality to this script; look at the ShellMessage() function in that script, which gets called whenever any window is created/minimized/destroyed/focused. 
The following is completely untested, but I believe adding this if-block to ShellMessage() would do the trick:
if (wParam == 32772 && Class == "Chrome_WidgetWin_1" && Title != "Sidewise") {
    WinSet, AlwaysOnTop, On, Sidewise ahk_class Chrome_WidgetWin_1
    WinSet, AlwaysOnTop, Off, Sidewise ahk_class Chrome_WidgetWin_1
}
I copied code from this page to do the raise-effect and found some of the SHELLHOOK event values on this page. I don't exactly know why 32772 is the code that gets sent when Chrome is focused but that's what I'm receiving on my system when I do so.

Let me know how you go!

Antwoord
Planned

Thank you for your thoughtful post and screenshot. It's always helpful to me to see how people are actually using Chrome/Sidewise. To your specific points:


  • Compact UI: Theming support is planned to be added in the medium-term, and I will include a "Compact" theme when that is done. As a partial "until then" solution, one thing you could do is press Ctrl+- or Ctrl+wheeldown to lower the zoom-level of everything in the sidebar, which produces a result that is fairly close to your custom-CSS solution. Chrome appears to remember the chosen zoom level for the sidebar between restarts.

  • Window titling: to clarify, are you looking for Sidewise to set the title of each Chrome window to match the associated window-row's label, e.g. "Maya MEL"?

    Unfortunately this is probably not feasible, because Chrome itself sets the window titles to match the last-active-tab's title in each window, and does not give extensions a mechanism to explicitly set/override the window title. To implement this, then, would require retitling the last active tab's title in each window, which could make finding a desired tab by title more confusing, even if Sidewise were to visually retain the correct 'actual' title for each page row in the tree.

    One thing you can do currently is to click a window row in the sidebar to focus that window, without changing which tab is focused within that window. But it sounds like this probably isn't quite the solution you're after.

    Do you think showing a "secondary" focus effect on page rows which were focused within non-focused windows be a viable solution? To see what I mean, focus a page row which is a child of another page row in the tree, then collapse the parent page row; you should then see a "dashed border" effect on the parent row which is meant to indicate that  one of its non-visible children rows has the focus. Perhaps the same kind of effect could be applied to the last-focused tab in non-focused windows.

  • Raise Sidewise when focusing any Chrome window: I think this is actually something that could be done internally by Sidewise. Currently, it is set up so that it only raises the sidebar when the dock window gets focused; this was done intentionally because I found that with multiple windows potentially located across multiple monitors, having the sidebar  raised after any Chrome-window-focus could be unexpected or annoying in many use cases. But it would be a pretty simple change to Sidewise to add a "Raise the sidebar when any Chrome window is focused" option, which would be subordinate to the "Keep Sidewise visible next to the dock window" option. Would this do what you're looking for?

Until I get to implementing this last one, you are of course more than welcome to create an external application to get the results you seek. In that vein, you might like to check out the AutoHotkey script I am working on, which addresses the alt-tab and Sidewise-icon-in-taskbar issues that affect Sidewise currently. 
I think it would be pretty simple to add your desired functionality to this script; look at the ShellMessage() function in that script, which gets called whenever any window is created/minimized/destroyed/focused. 
The following is completely untested, but I believe adding this if-block to ShellMessage() would do the trick:
if (wParam == 32772 && Class == "Chrome_WidgetWin_1" && Title != "Sidewise") {
    WinSet, AlwaysOnTop, On, Sidewise ahk_class Chrome_WidgetWin_1
    WinSet, AlwaysOnTop, Off, Sidewise ahk_class Chrome_WidgetWin_1
}
I copied code from this page to do the raise-effect and found some of the SHELLHOOK event values on this page. I don't exactly know why 32772 is the code that gets sent when Chrome is focused but that's what I'm receiving on my system when I do so.

Let me know how you go!

Thank you for your very prompt (!) reply.


  • Compact UI: I didn't think about using the in-built Chrome zooming. I didn't backup the old CSS files so I can't actually test it on the original style, but I'd reckon it probably wouldn't look better (at least for me) than being able to fully customize each section of it. Additionally, the zooming affects all images and icons, making them blurry due to them being changed to a non-native resolution. It should however be useful for users that want this kind of behaviour without having to go through the trouble of editing CSS.
  • Window titling: Yes, that is what I meant. Your workaround of renaming seems like it could work. Might be a little confusing to code, but I'm unsure of what you mean by it being confusing, as you say visually it would apparently look the same. Do you mean that the search feature wouldn't work properly because it wouldn't be able to get the tab's real name?

    I thought exactly the same about that secondary focus thing. Knowing which tab is active on every window would certainly help. However, I think the dotted outline is way too subtle. I would probably rather have a background colour, similar to what main tab is selected. Then again, whichever you implement I suppose I could probably just edit the style to my liking. I'm usually more concerned with efficiency rather than looks.

  • Raise Sidewise when focusing any Chrome window: You're right, I didn't think about the multiple monitor thing. I actually was thinking of addressing what could be improved in relation to that aspect in my post, but I forgot about it. I usually only have one or two windows in my secondary monitor, which is usually only used for simple things, such as GMail and YouTube music videos. As such, I never use Sidewise with it. Having Sidewise popup on my main monitor when switching to my secondary monitor's Chrome window could potentially be an annoyance in—I think—some very rare cases. Since I switch between Chrome and other programs probably more than a hundred times more than switching to my secondary monitor's Chrome windows, I think it would be a great trade-off.


I tried your AHK script, but it didn't work. I reckon the WM it should be sending to Chrome is WM_ACTIVATE, which is 6. I tried replacing the value with 6 but it didn't work either. 32772 in Hex is 0x8004. If I remember correctly, wParam can have high-bit flags on some messages, so I thought the most significant bit on that value is most likely a flag.  Removing the flag means the actual WM is 4. Tried with that value, and voila! It seems to work perfectly. I am not entirely sure why the WM is 4, as Microsoft doesn't seem to document it anywhere. There must be something that triggers that flag, so I kept both messages:

if ((wParam == 4 || wParam == 32772) && Class == "Chrome_WidgetWin_1" && Title != "Sidewise")
{
     WinSet, AlwaysOnTop, On, Sidewise ahk_class Chrome_WidgetWin_1
     WinSet, AlwaysOnTop, Off, Sidewise ahk_class Chrome_WidgetWin_1
}

Thank you greatly for your help, I'm quite pleased with it working the way I want to now. Makes Sidewise much better!

I've come across two problem in relation to the AHK script. First, when minimizing the dock window, Sidewise minimizes itself too, and it won't restore by using a window other than the dock window. I fixed it simply by adding this line to the code that was previously added:

WinRestore, Sidewise ahk_class Chrome_WidgetWin_1

The second problem is that on full-screen videos, such as youtube, the Sidewise window remains in front of the video. After a lot of fiddling around I managed to find a way to fix it, by using the following code:

if ((wParam == 4 || wParam == 32772) && Class == "Chrome_WidgetWin_1" && Title != "Sidewise")
{
    WinRestore, Sidewise ahk_class Chrome_WidgetWin_1
    WinActivate, Sidewise ahk_class Chrome_WidgetWin_1
    WinActivate, %Title%

    if(WinExist(ahk_class Chrome_RenderWidgetHostHWND))
    	WinActivate, ahk_class Chrome_RenderWidgetHostHWND
}

I had to use WinActivate instead of the AlwaysOnTop thing (I didn't manage to fix it with that, couldn't figure out why). There's a little flicker when switching back to Chrome from activating the Sidewise window and then back to Chrome (barely noticeable). Although when actually switching to full-screen, it'll go to full-screen, Chrome tab, then full-screen again. Little bit flickery, but bearable for me.

This is extremely helpful, thank you very much. This should accelerate the release of this script as an installable EXE significantly.

it is a really helpful post, keep posting such kind of information. I'm having the same issue starting today. I've tried different computers, different locations, Mac and Pc same issue window taskbar fix