Jump to content

wkoffel

Member
  • Posts

    45
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by wkoffel

  1. Thanks for the sleuthing, Alex. I didn't have any UTF characters in my terminal settings, so this was a good edge case to catch. I'll merge your pull request and get it out in an upcoming release.
  2. Decided to just get it fixed up right. The new version is now available, linked to from the main links up top. You can update with alleyoop, or directly download the latest version 2.2. If you don't yet have scripting enabled, it will show a dialog like the one below, and then helpfully open the system preferences privacy pane, so you can add Alfred to it. Let me know if that works for you Alex, and do spread the word about the plugin, always happy when people are taking advantage of it.
  3. Thanks for the nice words, Alex. Actually, that feature has been broken since 10.9, I hadn't realized until now! In 10.9, Apple increased security of the UI scripting accessibility layer, so programs can't modify it. The user has to add access to Alfred manually (too bad, it's slightly confusing for users, but I understand the security benefits of their decision). See https://developer.apple.com/library/mac/releasenotes/AppleScript/RN-AppleScript/RN-10_9/RN-10_9.html for the gory details. So the utility still works great on Yosemite, I'm using it every day. But the dialog is confusing. I will update to provide a better error message. In the meantime, you can add "Alfred 2.app" to the list of applications under System Preferences -> Security & Privacy -> Privacy. See instructions at http://mizage.com/help/accessibility.html for a detailed walkthrough. Hope that helps, and thanks for the reminder to update the plugin to make this clearer.
  4. GFE, check out this link: http://rottmann.net/2013/03/launch-iterm-2-on-startup-without-opening-a-terminal-window/ I ran into this issue with my own Terminal Workflow: http://www.alfredforum.com/topic/2334-terminal-control-workflow/ and that seems like the best solution outside of kludgy hacks in the applescript.
  5. Robert, I just published a new workflow that might be what you are after. http://www.alfredforum.com/topic/3955-workflow-amazon-affiliate-link-generator/
  6. Alfred 2 Amazon Affiliate Links Workflow Quick Start: Download Here An Alfred workflow for generating simple Amazon Affiliate links with your own tag. Designed for anyone who generates a lot of custom links from URLs. This workflow will clean up all the parameters from an amazon.com URL, and then append the configured tag to it. Setting Your Affiliate Code The keyword trigger alink code <your-affiliate-tag> will set a new affiliate code, which all subsequent calls to alink will use. Generating Links The keyword trigger alink <an-amazon-product-url> will strip extra junk from the URL (all the query params, which aren't necessary for Amazon product links), and append "tag=your-affiliate-tag" to it, copying the result to the clipboard. You will get an error message if you haven't set an affiliate code yet (see above), or if the target link is not a valid Amazon link. Install Notes Download the compiled workflow directly, or visit the repository for the full source code I'm happy to take feedback on the installation process. In theory, I've bundled all the necessary ruby gems in the workflow package proper, so it should be a simple double-click install. If you do need to install manually, please let me know. To install manual dependencies, you would run just "sudo gem install addressable", and that should suffice. This has been tested on OS X 10.13 High Sierra and above, and may work on earlier versions of macOS. It requires Alfred 3+ Credits Thanks to Bryan McKelvey for the simple Alfredo Ruby Gem (no longer used directly, but code inspired by) Thanks to phyllisstein for Alleyoop Release Notes v1.0 (Feb 24, 2014) - Initial release v1.1 (Mar 24, 2018) - Alfred 3 and High Sierra 10.13 support v1.2 (Oct 27, 2019) - Update for Alfred preferred JSON format, support for macOS 10.15 Catalina Feedback Wanted: I'd love to hear feedback. Are you using this workflow? How? What improvements would you like?
  7. I just posted an update (fresh link in the main post at the top) with support for Mavericks. Internally, the bundled gems now include version for ruby 1.8 (shipped prior to 10.9) and 2.0.0 (ships as the system ruby on Mavericks). Please let me know if you have any troubles running it on either, I haven't tested backwards compatibility to earlier OS X versions, but they should remain unaffected. Please note the new instructions in the main post, you will need to enable Accessibility differently on Mavericks, the workflow will no longer do it for you automatically.
  8. Fuzzy76, if you hold down the SHIFT key while selecting the profile from Alfred, it should open in a new tab. Designed to work in both iTerm and Terminal. Let me know if that does it for you. If you wanted, you could go into the Workflow and modify that to be the default behavior, to save having to hit SHIFT.
  9. For folks who don't want a fully-quit iTerm2 launching a default window and then this workflow launching another window on top of it.... Most of the solutions to preventing this are hacks in which the script would manually close the first window before opening a new one, and detecting whether a process is already running in Applescript is non-trivial. The best solution is modify your iTerm2 launch behaviors. See the following link for more info. http://rottmann.net/2013/03/launch-iterm-2-on-startup-without-opening-a-terminal-window/
  10. Glad it's working for you! I can confirm the behavior you are seeing, but only when iTerm is not already running. When iTerm is running, but with no open windows, it behaves as expected. Is that consistent with what you are seeing? And yes, happy to see if I can find a workaround.
  11. Just released a version 2.0 with the major addition of support for controlling iTerm2 as well as Apple Terminal. The keywords are the same but with "iterm" instead of "term". See top post for updates and release notes. I'd love feedback from iTerm2 users in particular on what other additions would be helpful for you. And if anyone knows how to modify the profile of a session already running, that'd be great. That's the one feature I couldn't replicate from the Apple Terminal support.
  12. Hey guys. Looks like we're all doing terminal control work in parallel. I wasn't sure if this workflow was being updated, and I'd had a couple requests, so I added iTerm2 support to my own ruby-based workflow. Mostly mirrors the Apple Terminal control stuff, and I think does everything this workflow does. Terminal Control Workflow http://www.alfredforum.com/topic/2334-terminal-control-workflow/ Thanks to quentinsf for the general approach, and this thread for inspiring me to go ahead and add alternate terminal emulator support. One note on a script above, you probably want "current terminal" and not "last terminal" for opening in a new tab. If the current isn't the most recently opened terminal, it'll have surprising effects. I'd love input from regular iTerm2 users (I'm an Apple Terminal guy myself) on what features would be helpful. I'm more than happy to extend my workflow to encompass other common workflow patterns just for iTerm2 users.
  13. Terminal Control v1.1 is now available, with auto-updating support via Alleyoop. New download link in the original post above.
  14. Awesome, I noticed the update via Alleyoop. Downloaded, confirmed that it works. And thanks for the rapid reply on a Friday night...I know I'm coding in the middle of a swank nightclub surrounded by throngs of attractive adoring fans right now, I can only assume you are as well. ;-) Rock on.
  15. I realized I could sanity check this myself. It looks like export does NOT include a copy of .git directories, so that's good at least. Still open to pitfalls and benefits of different development models, seems like that's still an evolving art here with Alfred v2.
  16. I've been developing my first few workflows, and I'm following a development model that looks like: - Have a git repo somewhere on my local machine that's pushed to github. - Symlink that directory into the Alfred workflow preferences folder - Alfred workflow preferences is under Dropbox, so it syncs between machines. A few questions have come up as I get deeper into this. 1. When I do an export of a workflow in Alfred preferences, so I can share the latest version with the world, does that package up the entire directory? Meaning, all the .git directories, project history, etc? 2. Is this symlink model the preferred way to handle things? Or do experienced devs find it's better to write a script to "install" a workflow standalone, because it causes less conflicts and problems. (one example is that Alleyoop won't find equipped workflows if they are symlinked, but I suspect other issues might arise with workflows or Alfred itself) (update: Alleyoop 2.552 and above now respects symlinked directories) Any other tips from experienced developers on git-managed workflows?
  17. Any chance the official version could make one small change, so that symlinked directories work? Took me 20 minutes to debug why Alleyoop couldn't see my update.json Adding followlinks=True to os.walk did the trick
  18. Check out a similar workflow I released to control Apple's Terminal. I didn't find yours until afterwards, Quentin, but looks like we had almost exactly the same needs! http://www.alfredforum.com/topic/2334-terminal-control-workflow/
  19. Yeah, I'm sure you won't be the only one. Looks like a similar idea for iTerm was written by quentinsf, http://www.alfredforum.com/topic/2318-iterm-2-profiles-workflow/ I'm sure this particular workflow could be extended to support iTerm, I believe it actually has better AppleScript support than Terminal.
  20. Alfred - Terminal and iTerm2 Control Workflow Requires Alfred 3+ Quick Start: Download Here (Alfred 2 users, the last compatible version was Terminal Control 2.2, still available here) An Alfred workflow for controlling aspects of Apple's Terminal Utility and iTerm2. Designed specifically for developers and admins who spend a lot of time in terminals at the command line. Particularly useful for those who manage multiple tabs and use varied Profiles (color themes) for Terminal/iTerm2 windows. New Terminals The keyword trigger term (or iterm) will bring up a list of Profiles (themes/skins) based on Terminal preferences. Continue typing to select one. Modifier keys: Shift: launch this Profile in a new tab Command: change the active Terminal tab to this Profile Merge and Split Terminal only: Keyword trigger term move will separate the current tab into its own window. Terminal only: Keyword trigger term merge will merge all open Terminal windows into one tabbed set. iTerm Only: Keyword trigger *iterm arrange* will call iTerm's "arrange all windows horizontally" window helper. Terminal to a Directory Keyword trigger term dir (or iterm dir), followed by a directory search phrase will launch the default Terminal profile, and automatically change to the selected directory. Why Do I Want This? I spend a lot of time connected to various processes, machines, networks, running screen/tmux sessions, etc. From my personal experience (read: typing the wrong command into an ssh session of a production machine and taking down large consumer web properties in the process), I've built a habit of always color-coding my terminal windows. White on black for local OSX terminal. Green on black for local virtual machines, green background for testing networks, and RED background for production machines (a constant reminder to be careful what I type). This alfred workflow allows me to launch terminal themes, and also change a terminal tab quickly to a new theme if I repurpose it for a new task. Install Notes Download the compiled workflow directly, or visit the repository for the full source code This is my very first workflow, so I'd appreciated feedback on the installation process. In theory, I've bundled all the necessary ruby gems in the workflow package proper, so it should be a simple double-click install. If you do need to install manually, please let me know. Hints are in the developer notes. You will need to allow accessibility support for Alfred. This should be prompted automatically. But since Mavericks, this happens in a new place, in the security and privacy system preferences area. Enable it as shown here if you get stuck: Thanks to Bryan McKelvey for the simple Alfredo Ruby Gem Thanks to phyllisstein for Alleyoop Thanks to Quentin Stafford-Fraser for inspiration and approach in his dedicated iTerm2 Profiles workflow Release Notes v1.0 (May 6, 2013) - Initial release v1.1 (May 10, 2013) - Support for Alleyoop workflow updater v2.0 (May 12, 2013) - Added control for popular alternative iTerm2 terminal emulator v2.1 (Nov 7, 2013) - Included bundled gems for ruby 2.0.0 for Mavericks OS X 10.9 Support v2.2 (Nov 21, 2014) - Improved UI scripting dialog to conform with 10.9+ privacy behaviors v2.3 (Jun 23, 2016) - Support for iTerm2 version 3.0.0+ to accommodate their new AppleScript dictionaries, dropped support for Alfred 2.x v2.4 (Oct 15, 2017) - Included bundled gems for ruby 2.3.0 for macOS High Sierra 10.13 Support v2.5 (Sep 29, 2018) - Support for macOS Mojave 10.14 v2.6 (Oct 27, 2019) - Removed alfredo and nokogiri dependencies, moved to Alfred JSON format, macOS Catalina 10.15 Support. Requires Alfred 3+ Feedback Wanted: I'd love to hear feedback. Are you using this workflow? How? What improvements would you like?
×
×
  • Create New...