Jump to content

open-chrome-profile


Alan He

Recommended Posts

Quote


Easy to open Chrome with selected profile.

 


Usage


type chromeprofile


idea from https://github.com/Wit4r7/AlfredAutomations. Thanks Wit4r7


Requirement


/usr/bin/python3 installed

 

 

I am the author of the workflow.

 

https://github.com/alanhg/alfred-workflows/tree/master/open-chrome-profile

 

Screenshot

image.png.b74467fdb74f5aeaf7804bd357a509e4.png

 

@vitor

hello, look forward to review it.

 

Edited by Alan He
Link to comment
Share on other sites

1 hour ago, vitor said:

You don’t need to ping me every time. I look at every post in this subforum and will get to everything. There are others also waiting, please be patient.

 

ok, got it.

Link to comment
Share on other sites

  • 2 weeks later...

Instead of mkdir, you should use mkdir -p otherwise the command may fail if intermediary directories are missing.


And you should prefer with input as argv over with input as {query}, but in this case the {query} escaping should be good.


The workflow fails is a profile does not have an image:


ERROR: Open Chrome Profile[Script Filter] Code 1: Traceback (most recent call last):
  File "/Users/vm/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.E6E61391-7E9B-47B3-980C-1D19EF9F9966/main.py", line 21, in <module>
    filename = profil[str(item)]['last_downloaded_gaia_picture_url_with_size'].split("/")[-1] + ".png"
KeyError: 'last_downloaded_gaia_picture_url_with_size'


Also, since it just does one specific Chrome-related thing, could you use an icon which is not the official one? https://font2png.com is a good resource for creating fast icons. I recommend having a non-transparent background with rounded corners.


Good to see you writing workflows in Python, though.

Link to comment
Share on other sites

Posted (edited)
On 4/14/2023 at 3:34 AM, vitor said:

Instead of mkdir, you should use mkdir -p otherwise the command may fail if intermediary directories are missing.


And you should prefer with input as argv over with input as {query}, but in this case the {query} escaping should be good.


The workflow fails is a profile does not have an image:

 

ERROR: Open Chrome Profile[Script Filter] Code 1: Traceback (most recent call last):
  File "/Users/vm/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.E6E61391-7E9B-47B3-980C-1D19EF9F9966/main.py", line 21, in <module>
    filename = profil[str(item)]['last_downloaded_gaia_picture_url_with_size'].split("/")[-1] + ".png"
KeyError: 'last_downloaded_gaia_picture_url_with_size'

 


Also, since it just does one specific Chrome-related thing, could you use an icon which is not the official one? https://font2png.com is a good resource for creating fast icons. I recommend having a non-transparent background with rounded corners.


Good to see you writing workflows in Python, though.

 

1. modify to  mkdir -p 

2. use arg instead of query

3. consider last_downloaded_gaia_picture_url_with_size not exist 

4, logo change

 

This logo, do you think it is okay?

 

https://github.com/alanhg/alfred-workflows/tree/master/open-chrome-profile

 

icon-logo-chrome-256.png.f698bbdb3982dbeb58c7a6672af360a0.png

 

Edited by Alan He
Link to comment
Share on other sites

36 minutes ago, vitor said:

This will be live soon at https://alfred.app/workflows/alanhe/open-chrome-profile/.

 

Another note: you have turned on “Alfred Filters Results” but then set the Keyword to “No Argument”. That won’t produce any results. Change it to “Argument Optional” and you get filtering for free.

 

thank you. and I fixed.

 

 

 

image.png.fda61fec77089bdb9ee171bcb28651d0.png

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...