jason0x43 Posted August 10, 2013 Share Posted August 10, 2013 (edited) This workflow lets you create and manage separate instances of Chrome. Each instance will have its own cache, settings, extensions, etc. This is handy for setting up different browser instances for work, testing stuff, whatever. There is only one command: "prism" (I like to keep things simple). By default, you'll see a list of available prisms. Type "+" to create a new Prism; you can supply a name (no spaces allowed) and description right in the Alfred command line, or dialogs will pop up for you to fill in. Selecting a prism can do three things:Just pressing enter will load the prism (or just bring it to the front if it's already running) Hold Cmd to edit the prism's JSON config file; this will let you add command line options for Chrome Hold Option to delete the prism Hold Ctrl to open the prism's app directory in Finder The source, and a more in-depth README, is available on GitHub. Download Update 2013/09/14: The README talks a bit more about the config file, and the config files for new prisms now have some instructional comments. Also, it's possible to set an initial URL for a prism by adding it to the options array in the config file (this may have worked before, but it definitely works now). Update 2013/08/28: The workflow now displays some basic help when no prisms are available (like right after you install the workflow). Update 2013/08/15: You can start a prism at a particular URL now. I also changed how prisms get named behind the scenes, so after you update all your prisms may show up with random looking names. You can use Shift to rename them. Update 2013/08/14: Fixed a bug that caused the workflow to break with newly created prisms. Update 2013/08/13: Added Alleyoop support Edited September 14, 2013 by jason0x43 Link to comment
jason0x43 Posted August 13, 2013 Author Share Posted August 13, 2013 Added Alleyoop support Link to comment
40-02 Posted August 14, 2013 Share Posted August 14, 2013 Hi there:) Cant make it work. What I do wrong: It writes: Error: No name specified or in config file Link to comment
jason0x43 Posted August 14, 2013 Author Share Posted August 14, 2013 Hi there:) Cant make it work. What I do wrong: It writes: Error: No name specified or in config file Sorry about that. There was a bug in the prism creation function that wasn't storing the prism's config properly. It should be fixed now. Link to comment
40-02 Posted August 15, 2013 Share Posted August 15, 2013 Great, Thanks. No it works. Is it possible to add parameters to open url in specific prism? for example prism testing http://www.alfredforum.com/topic/2977-chrome-prism-run-separate-instances-of-chrome/ Should open given url in "Testing" prism? Link to comment
jason0x43 Posted August 15, 2013 Author Share Posted August 15, 2013 Great, Thanks. No it works. Is it possible to add parameters to open url in specific prism? for example prism testing http://www.alfredforum.com/topic/2977-chrome-prism-run-separate-instances-of-chrome/ Should open given url in "Testing" prism? It can't do that yet, but that sounds like a good idea. Let me see what I can do... Link to comment
jason0x43 Posted August 15, 2013 Author Share Posted August 15, 2013 Ok, it kind of works. You can now start a prism at a particular URL with something like prism myPrism www.google.com. Unfortunately you can't open any URLs in an already opened prism, though. The method I'm using to make Prisms show up with a unique icon and name in the Dock is making it difficult to have Chrome do things like create new tabs or open URLs. I also changed how the workflow names apps. Before, the actual prism .app directory was named with a UUID, and the prism name was stored in a config file in the .app directory. That makes the dock look messy, though, since the name of the .app directory is what shows up on the Dock. So if you've made some prisms, they're going to have weird names when you update. I added a new modifier to the workflow to help with that -- you can hold Shift now to rename a prism. 40-02 1 Link to comment
jason0x43 Posted August 28, 2013 Author Share Posted August 28, 2013 New update: the workflow now displays some basic help when no prisms are available (like right after you install the workflow). Link to comment
nyugdijas Posted September 6, 2013 Share Posted September 6, 2013 Ok, it kind of works. You can now start a prism at a particular URL with something like prism myPrism www.google.com. Unfortunately you can't open any URLs in an already opened prism, though. The method I'm using to make Prisms show up with a unique icon and name in the Dock is making it difficult to have Chrome do things like create new tabs or open URLs. I also changed how the workflow names apps. Before, the actual prism .app directory was named with a UUID, and the prism name was stored in a config file in the .app directory. That makes the dock look messy, though, since the name of the .app directory is what shows up on the Dock. So if you've made some prisms, they're going to have weird names when you update. I added a new modifier to the workflow to help with that -- you can hold Shift now to rename a prism. Hi! Thanks for the great workflow! Helps my daily work a lot. But… Creating new prism with specifiedURL to open will be very helpful for me, though it doesn’t work for me. What am I doing wrong? I have tried the commend you mentioned first prism myPrism www.google.com. , but it does nothing, because I have to type prism + ‘something’ to create a new prism. So, I have tried this way too prism + ‘prism name’ ’someURL’ , but this doesn’t do the job too. Link to comment
jason0x43 Posted September 6, 2013 Author Share Posted September 6, 2013 Hi! Thanks for the great workflow! Helps my daily work a lot. But… Creating new prism with specifiedURL to open will be very helpful for me, though it doesn’t work for me. What am I doing wrong? I have tried the commend you mentioned first prism myPrism www.google.com. , but it does nothing, because I have to type prism + ‘something’ to create a new prism. So, I have tried this way too prism + ‘prism name’ ’someURL’ , but this doesn’t do the job too. What happens when you try the top command? Does a browser window open with no URL, or maybe with a partial URL? Let me know and I'll see if something's broken. Two things to keep in mind: you have to give Alfred a second or two after you finish typing "prism myPrism www.google.com" to update the query for the workflow; if you're too fast, the prism won't have the entire URL yet (I need give better visual feedback for this) opening a prism at a page only works if the prism isn't already running It is, unfortunately, a pretty limited solution at the moment. Link to comment
nyugdijas Posted September 10, 2013 Share Posted September 10, 2013 What happens when you try the top command? Does a browser window open with no URL, or maybe with a partial URL? Let me know and I'll see if something's broken. Two things to keep in mind: you have to give Alfred a second or two after you finish typing "prism myPrism www.google.com" to update the query for the workflow; if you're too fast, the prism won't have the entire URL yet (I need give better visual feedback for this) opening a prism at a page only works if the prism isn't already running It is, unfortunately, a pretty limited solution at the moment. Actually nothing happens If I type it, then press enter nor the Alfred window closes, nor a prism opens. Nothing… Just the general suggestions listed below. screenshot If I type it with a “+”, it opens the prism (also I can see the URL in the alfred window below the name of the prism I about to create), but doesn’t open the URL in it. screenshot Thanks for the help! Link to comment
jason0x43 Posted September 10, 2013 Author Share Posted September 10, 2013 Actually nothing happens If I type it, then press enter nor the Alfred window closes, nor a prism opens. Nothing… Just the general suggestions listed below. screenshot If I type it with a “+”, it opens the prism (also I can see the URL in the alfred window below the name of the prism I about to create), but doesn’t open the URL in it. screenshot Thanks for the help! Have you created myprism yet? First you need to create it with "+", then you can try passing it a URL. Hmm...I can see some value in creating a prism with an initial URL, though. I may add that in a future version. Link to comment
Apple314 Posted September 14, 2013 Share Posted September 14, 2013 Thanks for the workflow. This would really help me, but I'm having some challenges getting it setup. I have been able to create 2 instances with no issue. I have been able to get extensions installed the way I want. What I am trying to do is have a default url for each and I'd like one to come up in --incognito mode. I've tried setting the "homepage" value in the json file as well as --incognito with no luck. I have also tried "incognito.mode_availability" : 2. I also tried the --incognito setting in the run.sh file in case it was supposed to go there. I am new to chrome, based on seeing this workflow and loving the idea. What am I missing? Is there a formal list of available parameters/switches? I have googled it and am unsure which are settings for the json file and which ones are only for the command line. Again, thanks for the workflow, any insight you can provide would be most appreciated. Thanks -Dave Link to comment
jason0x43 Posted September 14, 2013 Author Share Posted September 14, 2013 Thanks for the workflow. This would really help me, but I'm having some challenges getting it setup. I have been able to create 2 instances with no issue. I have been able to get extensions installed the way I want. What I am trying to do is have a default url for each and I'd like one to come up in --incognito mode. I've tried setting the "homepage" value in the json file as well as --incognito with no luck. I have also tried "incognito.mode_availability" : 2. I also tried the --incognito setting in the run.sh file in case it was supposed to go there. I am new to chrome, based on seeing this workflow and loving the idea. What am I missing? Is there a formal list of available parameters/switches? I have googled it and am unsure which are settings for the json file and which ones are only for the command line. Again, thanks for the workflow, any insight you can provide would be most appreciated. Thanks -Dave I pushed an update a few minutes ago that will handle setting an initial page. (After some more experimentation I'm not sure the update was necessary; oh well, it's a bit cleaner now.) Just add the URL of interest to the options array in the config file. Don't edit the run.sh file directly, edit the config file instead. The run script gets recreated every time the prism is started to incorporate any changes in the prism's config file. To load an initial URL in incognito mode, your config file could look like: { "options": [ "--incognito", "www.google.com" ] } A good list of Chrome switches is available at http://peter.sh/experiments/chromium-command-line-switches/. Link to comment
Apple314 Posted September 14, 2013 Share Posted September 14, 2013 Jason, Thanks for the quick response. I had tried something very similar. When I pasted your config file in, it worked so I thought it was a typo on my part, then I went to change another instance and it didn't work. I had a generic Chrome (not prism) session open and I think it was caching something. Once I closed all chrome instances, changed the config and went back in, it picked up the settings. Thanks again for the workflow. Link to comment
jason0x43 Posted September 14, 2013 Author Share Posted September 14, 2013 Jason, Thanks for the quick response. I had tried something very similar. When I pasted your config file in, it worked so I thought it was a typo on my part, then I went to change another instance and it didn't work. I had a generic Chrome (not prism) session open and I think it was caching something. Once I closed all chrome instances, changed the config and went back in, it picked up the settings. Thanks again for the workflow. Glad to hear its working! One thing to keep in mind is that the settings in the config file only apply when initially starting the prism. If you've closed all of a prism's windows but the prism-ed Chrome is still running, starting the prism from Alfred will open a new window, but any new config options won't take effect. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now