lagrange
lagrange copied to clipboard
Only one instance is allowed to run, others just exit.
When an instance of LaGrange is running, no other instances can be started. To make matters worse, no message is provided and the attempted second lagrange process simply exits, making it look like it died. (This has caused me to recompile and revert to older versions until I noticed a running instance).
I understand if it is your conviction that only a single process should exist - in which case, a message should be printed if another attempt is made. Another possibility is to make sure the existing one is visible - which is not a great idea since it must then switch workspaces or mess with the window layout.
Having multiple instances is useful (I keep several workspaces and would love to have a couple of browsers for different purposes). I understand that it requires some rethinking on how to deal with state files, bookmarks, etc. But it would be a nice thing to do.
The behavior that is currently implemented (if it works) is that when you try to start a second instance, it will open a new tab in the first instance and raise its window to the front. When running from the command line, this allows querying or controlling the open tabs.
There are multiple older issues related to instances, like #37. The gist of it is that having multiple windows (#191) is an easier way to achieve a user experience similar to multiple instances without needing to maintain a shared database between them.
I can understand your choice of single-instance. It does present problems for certain workflows:
- Multiple workspaces (can't live without them). I keep one for developing my game and testing with LaGrange, another for general purpose browsing, and another with ssh sessions to another box for my gemlog, and again want a LaGrange window there too... I have to keep dragging LaGrange to the workspace for my current task.
- Multiple workspaces again. My system does not behave the way you described and I have no indication that anything is happening, If the tab is added in another workspace where LaGrange happens to be active, I would not know until I check.
- Current workspace is where I want to be, and the last thing I want is to be forced into another workspace to an open instance of LaGrange - the reason I am trying to open it here is because I need it here, in this workspace. And the way I left LaGrange there is the way I want it to be, not with extra tabs from another workspace.
That is not particularly good user experience, for anyone with workspaces (which I thought was everyone:)
If you choose to leave it as is, could you please print a message when a second invocation of LaGrange is executed? Then at least I will know that there is another LaGrange running. Yesterday I wound up regressing to earlier versions and recompiling a number of times because it seemed that LaGrange failed silently - as I had no way of knowing it was adding a tab to the current instance in another workspace.
Thanks.
could you please print a message when a second invocation of LaGrange is executed?
This seems like a reasonable thing to do, yes.
@skyjake When you implement Multiple Windows in one instance in the future, is it possible to also detect which workspace/display the user is on so that the new window will open in that spot?
@krixano I would expect so, although how it actually works in practice is probably very platform-dependent. Will need testing and experimentation once I get that far.