emamuna Posted August 1, 2016 Posted August 1, 2016 (edited) Windows switcher Description The workflow can be used to switch between the many windows in the current desktop. It's really easy to use, you can switch to a specific named window using the keyword swin <name of the process or name of the window>. Then a list with the following informations about the results will appear: Process Application name When you open one result, by pressing Enter on it, the selected window should be opened. In real the workflow opens all the windows of the process, but it puts in foreground just the selected window. With the ⌥ modifier all the windows belonging to an other processes will be hidden. ---------------------------------------------- State Author Emanuele Munafò Version 1.1 Last release 02/08/2016 Email ema.muna95@gmail.com Compatibility: Alfred v3 ( or higher) Alfred 2 NOT supported. ---------------------------------------------- Changelog and update v1.1Now the results are filtered by both the name of the window and the name of the process. [02/08/2016] Thanks to: Jean-Claude Jung First release [01/08/2016] ---------------------------------------------- Screenshots ---------------------------------------------- Download Click here to download from Packal ---------------------------------------------- Bug You can contact me here or by email if there is something wrong with the workflow. I had never programmed with Applescript until now, so be kindly if the structure of the script is not so good. Known: All the windows of the process will be opened, not the best way. If a process has many windows in different desktop some issues can be revealed. ---------------------------------------------- Todo Open just the selected window. Add caching system for icon path/appname (It should improve the performance of about 1 sec) Edited September 2, 2016 by emamuna Fixed typo (Packet → Packal) juliosecco and 40-02 2
juliosecco Posted August 7, 2016 Posted August 7, 2016 Windows switcher Description The workflow can be used to switch between the many windows in the current desktop. What a nice workflow! ottimo lavoro, Emanuele! I have just a comment, if I can make a suggestion: I did try to remove the code that finds the item icons, and indeed all the stuff seems to be "snappier" and a lot faster, especially with a lot of windows opened. So I think it could be possible to: 1) have the workflow contain and assign directly the icons for common processes ( finder, mail, safari, etc ) 2) for less common processes, cache the results so only one icon search would be performed if more than one window is opened I think is a good good workflow for everyday use, gaining something in terms of speed would maker it perfect! thanks for doing and sharing it, Giulio
emamuna Posted August 7, 2016 Author Posted August 7, 2016 Yes, I know. I already thought about this, answering another user who was disappointed by the performance. Here the log: I think an easy caching, simple as caching just icon and app name, should improve performance.In the attachment a workflow that can be called with the swinn keyword that use always same icon and doesn't get the app name. The performance boost seems noticeable (testing with the script editor the last script execute in 0sec, while the first needs 2 secs.) Note that this value is just an approximated integer, so I can't have a real difference but seems that should be more then 1 sec. Ofc a cached script will use some more cycles. I think it needs a try! But I also told him that I'll do that when I will have some free time. I already started my studies for the university for the next exam, so I don't know when I'll update it. But thank you for your feedback, it is welcome! Let me know if you have more suggestion! PS: In the link below there is the script I did for the people who needs better performance now and can't wait the update. https://mega.nz/#!nA0ASTiY!CvGQpZPCbCITGf7aM4BudDIB6ljWrkuCWMiTpjBq1Kc attive by keyword swinn with double n (Change it if you want ofc)
40-02 Posted August 7, 2016 Posted August 7, 2016 Great workflow! I was looking for workflow like this for very long time!
Stelios Posted August 31, 2016 Posted August 31, 2016 Hey man nice work, i wish i knew about your workflow before creating mine, it does somewhat the same thing. I think if we combine them together we can make a really good workflow. I see that you only work with processes but mine also detects non scriptable apps and reopens them, it does have some issues but i think a combination of code can fix a-lot of issues and make a pretty dynamic workflow. Check out mine, you might find the code a bit messy as i am not an apple dev and just trying to get into it! https://github.com/SteliosHa/Alfred_QuitFocus-Mgr
emamuna Posted August 31, 2016 Author Posted August 31, 2016 Hey man nice work, i wish i knew about your workflow before creating mine, it does somewhat the same thing. I think if we combine them together we can make a really good workflow. I see that you only work with processes but mine also detects non scriptable apps and reopens them, it does have some issues but i think a combination of code can fix a-lot of issues and make a pretty dynamic workflow. Check out mine, you might find the code a bit messy as i am not an apple dev and just trying to get into it! https://github.com/SteliosHa/Alfred_QuitFocus-Mgr Nice, In real I have no time until 13 September because I have an exam tomorrow and another on that date. After that I thought about rewriting my script in python adding caching and maybe other features. Your workflow could be useful, thank you. If you have further question about code, feel free to contact me by mail! (speaking here about the code could create confusion inside the topic)
zamboknee Posted September 1, 2016 Posted September 1, 2016 Not having success. I'll type 'swin' and nothing happens. https://www.dropbox.com/s/j50h3t4nffdchme/AlfredScreenSwitcher-screencap.mov?dl=0
emamuna Posted September 1, 2016 Author Posted September 1, 2016 Not having success. I'll type 'swin' and nothing happens. https://www.dropbox.com/s/j50h3t4nffdchme/AlfredScreenSwitcher-screencap.mov?dl=0 I'm sorry for that, can you provide more information about your system? (OS X version, Alfred version, debug output) In the meanwhile you can try two different script: Click here to download from Packal keyword to use: swin and the different version here (with keyword swinn) https://mega.nz/#!nA...rkuCWMiTpjBq1Kc Read the previous message to understand the difference between the two version of the workflow. Emanuele
deanishe Posted September 1, 2016 Posted September 1, 2016 Alfred 2 was NOT tested. (but i think it should work too) That's a no-go, I'm afraid. If you built the workflow with Alfred 3, it will not work in Alfred 2. It doesn't matter whether it uses 3-only features or not, unfortunately. After that I thought about rewriting my script in python adding caching and maybe other features. If you do, there's my Python library, which has decent caching smarts built in (it's fundamentally designed around using cached data for speed while updating the cache in the background). It can also take care of other tedious crap like updating the workflow, and the fuzzy search would be a great fit for your workflow. emamuna 1
emamuna Posted September 2, 2016 Author Posted September 2, 2016 That's a no-go, I'm afraid. If you built the workflow with Alfred 3, it will not work in Alfred 2. It doesn't matter whether it uses 3-only features or not, unfortunately. If you do, there's my Python library, which has decent caching smarts built in (it's fundamentally designed around using cached data for speed while updating the cache in the background). It can also take care of other tedious crap like updating the workflow, and the fuzzy search would be a great fit for your workflow. Thank you danish both for your answer about v2 compatibility and for the great work you did with alfred-workflow. I'll use your (wonderful) python library for sure, as I did for every workflow I wrote (except this one ofc!) As regards the caching system, I don't know if I could use the built-in method in your library , because I want to cache just the process name with the ico-path related to that application. deanishe 1
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