Jump to content

caleb531

Member
  • Posts

    56
  • Joined

  • Last visited

  • Days Won

    2

caleb531 last won the day on December 1 2014

caleb531 had the most liked content!

Contact Methods

  • Twitter
    https://twitter.com/caleb531

Profile Information

  • Interests
    Software, programming

Recent Profile Visitors

1,513 profile views

caleb531's Achievements

Member

Member (4/5)

21

Reputation

  1. The Alfred documentation lists a number of Alfred-specific environment variables I can use in my workflow scripts. In my case, I'm using alfred_workflow_bundleid and alfred_workflow_data in my workflow. For example, here's some Python code from my workflow that uses these environment variables. Certainly, I can expect these variables to exist in Alfred 5, but I'm unsure of Alfred 4 support, so I've added hardcoded fallback values just in case. WORKFLOW_BUNDLE_ID = os.environ.get('alfred_workflow_bundleid', 'com.calebevans.youversionsuggest') HOME_DIR_PATH = os.path.expanduser('~') LOCAL_DATA_DIR_PATH = os.environ.get( 'alfred_workflow_data', os.path.join(HOME_DIR_PATH, 'Library', 'Application Support', 'Alfred', 'Workflow Data', WORKFLOW_BUNDLE_ID)) So how far back are these supported? Are they available in Alfred 4 or 3? https://alfredapp.com/help/workflows/script-environment-variables/ Thank you in advance! Caleb Sidenote: I originally posted this question on Twitter and was directed to ask it here on the forums.
  2. @vitor ⌥↩ did the trick. Thank you! It's not the most developer-friendly, since it's not clear that the input has multiple lines in it. But the workaround isn't that bad. @vitorThis feature request was mostly inspired by your comment on my workflow submission for the Alfred Gallery, where you suggested that a Text Area would be more user-friendly, and I agree. But to make that work, I would need a straightforward way of supplying a default value (containing multiple lines) to this Text Area field.
  3. Hi, Suppose I have a "Text Area"-type User Configuration field that should have one value on each line of the text area. This might make it easier to edit for the user than one long comma-separated string value. However, Alfred 5's current form item for Text Area fields uses a single-line input for the "Default Value" field, meaning you cannot "enter" down and add a new line with the next enumerated default value. Adding `\n` does not seem to work either, as it renders as a literal "\n" when populating the user-specific values (e.g. on workflow install). Is there a workaround for this? Would you consider making this "Default Value" field a proper text area for the "Text Area" user configuration type? I understand that configuration values are exposed as environment variables, however environment variables still certainly allow newlines (tested in both bash and zsh to be sure). Please see my attached screenshots for reference (apologies if they appear huge—blame the Retina display 😅).
  4. This is a workflow I created for searching for your church's Planning Center account for people, such that you can easily look up phone numbers and email addresses. There are two configuration options to connect you to your Planning Center account; the README include details on how to generate these tokens. Main Page: https://github.com/caleb531/planning-center-alfred Alfred Forum Post: N/A Dependencies: none Documentation: in GitHub README (the About section in the workflow itself points to this page) Screenshots: see attached
  5. Hi Caleb, just found your YouVersion Suggest workflow for Alfred. Thank you so much for doing this. Truly a blessing. With thanks and prayers. Ernest

  6. This is a workflow I created for searching for a Bible verse or topic in just a few keystrokes. The workflow is configurable, albeit with a custom preferences system because of the complex nature of how the preferences relate to each other (e.g. the list of available version/translations is scoped to your selected language). Main Page: https://github.com/caleb531/youversion-suggest-alfred Alfred Forum Post: https://github.com/caleb531/youversion-suggest-alfred Dependencies: none Documentation: in GitHub README (the About section in the workflow itself points to this page) Screenshots: see attached
  7. This is a workflow I created for quickly opening the conference URL (Zoom, Google Meet, MS Teams, etc.) of your next calendar event. https://github.com/caleb531/open-conference-url There is no associated Alfred Forum post, but you can see by the GitHub stars and past issues that I am not the only user of the workflow. 😅 There are no dependencies or unsigned binaries in the workflow (icalBuddy used to be required, but it has since been removed to make the workflow more portable and to bypass permission issues). A screenshot (with shadow and the default Alfred theme) is attached.
  8. caleb531

    Play Song

    This is a workflow I created for quickly playing a song, artist, album, or playlist in the Apple Music app. Link to GitHub repository Link to original Alfred forum post There are no dependencies besides running macOS Catalina or later. The latest documentation on how to use can be found in the latest GitHub README. Screenshots (with shadows and the default Alfred theme) are attached.
  9. With the "new normal", many of us are working from home and jumping from one virtual meeting to the next to the next: from Zoom to Google Meet to GoToMeeting, etc. To save the pain of scrambling to open your next meeting link, I have written a workflow just for that! It's called "Open Conference URL", and its usage is simple: type conf to see your upcoming calendar events. Hit Enter to launch Zoom/Meet/etc. immediately. And even if you are 15 minutes late, the workflow will know what to do. (Download Workflow) If there are no nearby calendar events, the workflow displays all events for today: Download Workflow For documentation on all the configurable preferences, see the project's GitHub page: https://github.com/caleb531/open-conference-url
  10. Thanks for the Alfred YouVersion workflow Caleb! Very handy! :)

  11. Hi, Occasionally, I find myself unintentionally force quitting an application through Alfred when I didn't mean to (when I instead meant to launch an application like Forklift. Because force quitting can be a potentially destructive operation (bypassing save dialogs and such), I would greatly appreciate an option to confirm before force quitting any application (much like the Alfred confirm dialogs for "Shut Down" and "Quit All"). Thanks, Caleb
  12. Hi, First of all, I just want to say that Alfred totally rocks, as it makes me so much more efficient. When I used Alfred 2, I would always keep the "Fade in Alfred Window" setting disabled because I liked being able to use Alfred immediately. However, when I upgraded to Alfred 3, I noticed that the Large Type overlay fades in, which I find rather annoying. I also find it inconsistent, since the overlay has no fade-out animation and since Alfred 3 has seemed to remove the "Fade in Alfred window" setting anyway. Therefore, I'm asking that the fade-in animation for Large Type be removed, or at least that a setting to disable it would be added. Thanks for considering this, Caleb
  13. Alright, @deanishe, I've installed your updated version of the test workflow. Here's the debugger output after running it: Starting debug for 'Do More Stuff' [2016-06-02 11:44:24][utility.debug] Reading from query: passed [2016-06-02 11:44:24][utility.debug] Reading from argv: failed [2016-06-02 11:44:24][ERROR: action.script] /Users/Caleb/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Scripts /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC /Library/Python/2.7/site-packages CWD: /Users/Caleb/Dropbox/Applications/Alfred.alfredpreferences/workflows/user.workflow.3897A013-539B-4ECB-81C1-6107A9A2817A SCRIPT DIR: /Users/Caleb/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Scripts And yes, I realize there are solid workarounds. I already reverted my scripts to using {query} as they have been, though that doesn't always work for multiline input, which one of my workflow's action scripts must handle. Running Python from Bash as you suggested would fix that, and it seems like a much more elegant and reliable solution than {query}. Therefore, if all else fails with this issue, I'll probably resort to doing just that. Still, I'm fascinated by the fact that you get different results than I, and so I'm still very much interested to see if you or anyone else finds additional insight into this issue.
  14. Hi, I've been working to improve Alfred 3 support for one of the workflows I maintain (written in Python). For every one of my Script Filter and Run Script objects, I used to have the "with input as {query}" option selected. Since Alfred 3 introduced the ability to read input from argv (and recommends it), I was working today on updating my code to switch to reading via argv instead of via {query}. However, when I change the selected option in my workflow objects and update my code to use sys.argv[1] instead of '{query}', my workflow-local Python modules (i.e. modules I place in the directory of the installed workflow) are now unable to be found. I attached a simple example workflow which demonstrates the issue: open the workflow debugger and run the "dostuff" keyword in Alfred; you should notice in the logs that one script action passes, while the other fails. Do Stuff.alfredworkflow I'm using Alfred 3.0.1 build 671 on OS X El Capitan (10.11.5).
  15. HI, I'm a huge fan of Alfred, and I use it every day for many things. In my setup, there are always a number of directories I like to exclude from Alfred's result list (such as any node_modules/ or bin/ directories). Currently, I must always manually add them to the Privacy tab in Spotlight preferences, though this is far from ideal (because I have two Macs, I must perform this chore on them both). I llooked through the Alfred docs in search of a better solution (ideally, something I could automate) and discovered the alfred:ignore Spotlight comment, which was exactly what I needed (or so I thought). However, after applying alfred:ignore (programatically, of course) to all directories I desire to exclude, I noticed something rather peculiar and counterintuitive. It seems that alfred:ignore only ignores the directories themselves (the ones to which you add alfred:ignore), but not any their subdirectories. As a result, though I no longer see the ignored root directories in Alfred, all of their subdirectories still show in the results. Things I've tried: reloading Alfred's cache via the reload keyword, and clearing Alfred's application cache under Alfred Preferences > Advanced, but neither of those options made Alfred ignore the subdirectories of the directories I've ignored. Questions: is this a bug or is this the expected behavior? And if the latter is true, then how could I tell Alfred to recursively ignore directories in a way that can be automated? I hope that all makes sense. Please let me know if I need to clarify anything. Thanks in advance, Caleb
×
×
  • Create New...