Jump to content

himat

Member
  • Posts

    13
  • Joined

  • Last visited

Posts posted by himat

  1. I want to run a program every time I type something like ";today;"

    But is there any way right now to do a pattern matched snippet so that I could have a snippet using regex like ";.*;" ?

     

    Basically I want to make a date workflow where if I type in ";tomorrow;" it will replace that text with tomorrow's date. This seems like it would be a lot more seamless to use rather than having to cmd+space to bring up alfred, typing in the workflow keyword, and then typing in "tomorrow".

  2. Here's the workflow: https://www.dropbox.com/s/18e6nwg6om4yymh/snippets with scripts.alfredworkflow?dl=0

     

    You should copy some text to your clipboard, then type ".title", and the text should be turned into title case, but it doesn't work within alfred for some reason.

     

    1. Alfred 4.0.7 [1131]
    2. macOS Mojave 10.14.5 
    3. System bash (via `bash --version` in terminal): GNU bash, version 5.0.2(1)-release (x86_64-apple-darwin17.7.0)

    Thank you

  3. Making it a script fixed that problem, but it seems there's still some problem with used `sed` in alfred.

     

    string="helLO tHEre"
    echo "$string" | sed 's/.*/\L&/'

    This works in the terminal and outputs "hello there".

     

    But when I run (even as an external script) within Alfred, it outputs "LhelLO tHEre". 

    Why doesn't this work?

  4. I tried running this script in a workflow

     

     

    #!/usr/local/bin/bash
    
    
    string="a FeW WOrdS"
    string=${string,,}
    
    echo "$string"

     

     

    But then in the Alfred workflow debugger, I get 

     

     

    /Users/me/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/A4DF2A96-E3FC-4D43-BAEC-BD9CDFAA265E: line 10: ${string,,}: bad substitution

     

    This script works in my normal terminal, so why doesn't it work in an Alfred script?

     

     

  5. Github

    Download here

     

    This is for when you already have an image you just copied in your clipboard already, and you want to upload it to Imgur and get a link.

    Activate via `imgur` Alfred keyword

    No other arguments required

    This workflow uploads the most recent clipboard item to imgur and pastes the uploaded image URL into your clipboard. It also opens a browser tab with the uploaded image automatically.

    Note that if your most recent clipboard item is not an image, then you will be shown an error and nothing will be uploaded.

     

    image.png.4d22b114628bff3ea5d0855c49072354.png

     

×
×
  • Create New...