Jump to content

vitor

Staff
  • Posts

    8,523
  • Joined

  • Last visited

  • Days Won

    711

Posts posted by vitor

  1. 6 hours ago, andy4222 said:

    Was there a change made to this to make it work with 12.3? It still does not work

     

    Again, you need to read and follow the top post. That error means you either did not download the updated version, or you did not (correctly?) reinstall Python 2. The top post explains all of this.

     

    4 hours ago, Mollib said:

    Thank you for adding the dict.cc workflow. It finds python now, but SSL fails

     

    Welcome @Mollib. That error is unrelated to the port, so you’ll have to ask the developer. Or consider a non-Python alternative.

     

    2 hours ago, cands said:

    Would it be possible to add alfred-cheat?

     

    Added. But please let the developer know about the Python deprecation. If they don’t know, they can’t fix it. Informing the developer should always be the first step.

  2. 4 hours ago, jericon said:

    Is there any way to trigger a workflow based on an application opening?


    By design, Alfred has to be explicitly called. But you can set up a Workflow to open the application and run your automation, which leads to the same result. Unless you’re not the one triggering the application to open, in which case more details are needed regarding your setup.

  3. 1 hour ago, dandro18048 said:

    I understand that this issue arises because I attempted to change the default version of python 2.7


    No, the issue arises because you’ve updated to Monterey 12.3 and /usr/bin/python no longer exists. It’s not your fault.

     

    You cannot change the system installation of Python with pyenv and that did not remove your modules. Rather, those specific packages do not ship with the new installation. But you haven’t specified which Workflows are affected, which makes it harder to help you.

     

    You are unlikely to screw up your system because Apple has put in place a bunch of checks to prevent that.

     

    See Making Python 2 Workflows work on macOS Monterey 12.3 and above for an explanation of what’s happening and fixes.

  4. 2 hours ago, giovanni said:

    first pull request sent, thanks for the tips!

     

    Congratulations!

     

    Note @clarencecastillo hasn’t been active on GitHub so there’s a good chance it won’t get a reply, but don’t get discouraged! PRs with many changes can take long to review, so smaller incremental changes are often merged faster, but you didn’t really have a choice this time.

     

    2 hours ago, giovanni said:

    I am still learning about developer etiquette, if there is one 😀.

     

    From a decade of maintaining Homebrew Cask, the best tip I can give you can be summed up in the word “empathy”. Be cordial and respect other people’s time. In all situations, but especially when asking for help, be thorough—the clearer you are and the more you share in advance, the fewer back and forth will be needed. Speaking for myself, when I see someone has put in the effort I’m more eager to help. So what I’m saying is “keep doing what you’re doing”.

     

    Oh, and don’t respond to animosity with more rudeness. It’s not worth your time or mental health to be angry. Either abandon the conversation, or if you must reply do it with kindness. Some people will tone it down or even apologise while others will double down—you don’t know until you try—but avoid escalating, it makes it worse. My philosophy is that it’s never “you against them” but “you and them against the problem”.

     

    If you are a pleasant person to interact with (you are!) and choose to view things in the best light, you’ll keep going and learn everything else.

     

    2 hours ago, giovanni said:

    I will keep you updated!

     

    You already have two Workflows in the alternatives column, one of them listed twice!

  5. 3 hours ago, 0V1D1Y said:

    do you think it can be a feature request?

     

    It already is. But it doesn’t necessarily mean it will be implemented. You’re asking for a feature which requires the mouse and Alfred is keyboard-centric. The official way to show the Clipboard History or Snippets Viewer is to press the keyboard shortcut. As far as I know, you’re the only person to have ever made this request.

  6. 1 hour ago, giovanni said:

    feel free to use as you like or I can open a pull request?

     

    My recommendation: do a pull request, you don’t need to ask first. It is possible your PR isn’t merged or doesn’t get a reply because the person is busy or no longer active, but that’s still worth it because others who are looking for the fix will find it more easily and can pull it for themselves. Even if your PR is refused, you’re likely to get useful feedback. Remember not to take it personally and you’ll do fine.

     

    Extra tip: you can check all of your open PR by going to http://github.com/pulls. I do it once in a blue moon to check what’s really old and close those.

     

    Also, I haven’t yet decided how exactly I’m going to do it but I’m considering a new column in the updated Workflows table for notes, including alternatives and Py3 forks. If you want to ping me (however is most convenient for you) about the Workflows you update for Python 3, I can add them to the table. It’s also useful if you ping me about the pull requests you make, because I can follow those on GitHub and remove them from the repo if they are merged.

  7. 8 hours ago, Larrikin said:

    Any ideas on how to remove the intel package python 2

     

    You installed from a PKG, and those can do essentially anything. For instructions on how to uninstall that, you’ll have to check their website. Or you can try a specialised tool.

     

    @andy4222 Please read and follow the top post. This is not a thread to ask every developer about their Workflow, use the Workflow’s own thread for that. If you need a fuzzy finder alternative, @Mr Pennyworth has one.

     

    5 hours ago, andy4222 said:

     

    Added.

  8. Welcome @jcarrolo,

     

    4 hours ago, jcarrolo said:

    Is it possible to eliminate the syncing for this workflow?

     

    No, you cannot do it on a per-Workflow basis.

     

    4 hours ago, jcarrolo said:

    Do I need to turn off preference syncing and turn it back on when I make other preference changes?

     

    That’s one option, but there may be better ones. What exactly are the paths you use on each machine?

  9. First open you Run Script. Edit it:

    1. Change Language to /bin/zsh.
    2. Replace all code with /usr/bin/swift ./mediakeys "${1}"

    Now open the Workflow’s contents in the Finder and create a new mediakeys file. Inside, put this code:

     

    // Based on the code on https://stackoverflow.com/questions/11045814/emulate-media-key-press-on-mac
    
    import Quartz
    
    let NX_KEYTYPE_SOUND_UP: UInt32 = 0
    let NX_KEYTYPE_SOUND_DOWN: UInt32 = 1
    let NX_KEYTYPE_PLAY: UInt32 = 16
    let NX_KEYTYPE_NEXT: UInt32 = 17
    let NX_KEYTYPE_PREVIOUS: UInt32 = 18
    let NX_KEYTYPE_FAST: UInt32 = 19
    let NX_KEYTYPE_REWIND: UInt32 = 20
    
    let supportedKeys: [String: UInt32] = ["playpause": NX_KEYTYPE_PLAY, "next": NX_KEYTYPE_NEXT, "prev": NX_KEYTYPE_PREVIOUS, "volup": NX_KEYTYPE_SOUND_UP, "voldown": NX_KEYTYPE_SOUND_DOWN]
    
    func HIDPostAuxKey(key: UInt32) {
      func keyDown(_ down: Bool) {
        let flags = NSEvent.ModifierFlags(rawValue: (down ? 0xa00 : 0xb00))
        let data1 = Int((key << 16) | (down ? 0xa00 : 0xb00))
    
        let ev = NSEvent.otherEvent(with: NSEvent.EventType.systemDefined,
                                    location: NSPoint(x:0,y:0),
                                    modifierFlags: flags,
                                    timestamp: 0,
                                    windowNumber: 0,
                                    context: nil,
                                    subtype: 8,
                                    data1: data1,
                                    data2: -1)
        let cev = ev?.cgEvent
        cev?.post(tap: CGEventTapLocation.cghidEventTap)
      }
    
      keyDown(true)
      keyDown(false)
    }
    
    HIDPostAuxKey(key: supportedKeys[CommandLine.arguments[1]]!)

     

    The code could get some cleanup, but it will work like your previous one.

  10. When asking for help with a Workflow, please upload it somewhere as we can’t properly help you without access to it. I have some rough Swift code which can replace the Python, but without seeing your setup it’s hard to guide you on how to do it.

     

    Also, please avoid asking the same question in multiple places at once at the same time, or at the very least let the people on both sides know so we can see what progress has been made.

  11. 4 hours ago, michbsd said:

    Concerning the "Password Generator" workflow

     

    The error means that particular action requires the Objective-C bridge. There’s a very small subset of Python 2 Workflows who do. At the moment it’s not viable to support those because the required Python packages fail (for me?) to build under Apple Silicon. If you’re on Intel, you may be able to do so ("${HOME}/.pyenv/versions/2.7.18/bin/python2.7" -m pip install PACKAGE_NAME) but the build failure makes it impossible for me to support it.

     

    1 hour ago, eshmootie said:

    but as of the update the following workflow is broken for me

     

    Welcome @eshmootie,

     

    That Workflow doesn’t use Python, so whatever is broken is something else. @Acidham has a Workflow you may wish to try.

     

    27 minutes ago, Travis Schmeisser said:

    The output is "ls: /bin/python: No such file or directory"

     

    Try again with:
     

    eval "$(brew shellenv)"
    ls -la "${HOMEBREW_PREFIX}/bin/python"

     

  12. Welcome @damagekko,

     

    The error means that particular action requires the Objective-C bridge. There’s a very small subset of Python 2 Workflows who do. At the moment it’s not viable to support those because the required Python packages fail (for me?) to build under Apple Silicon. If you’re on Intel, you may be able to do so ("${HOME}/.pyenv/versions/2.7.18/bin/python2.7" -m pip install PACKAGE_NAME) but the build failure makes it impossible for me to support it.

  13. 17 hours ago, John H said:

    Making an assumption you speak Portuguese

     

    I do, yes, though that expression is Brazilian and I’m Portuguese. We would say “És o maior!” (literally “you’re the biggest”).

     

    17 hours ago, John H said:

    it's chugging along now.

     

    Great! The clue was that ls worked for you in a Terminal but the diagnostics wasn’t finding any paths. This is a good example of why it’s useful to always send it.

×
×
  • Create New...