Jump to content

Colin

Member
  • Posts

    26
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Like
    Colin got a reaction from llityslife in Dual Finder windows   
    I dislike have to manually resize and position Finder windows, so after a little research I came up with this solution
    This workflow produces two Finder windows side by side, any size any position.
    Modify the script to suit your needs. Hope someone finds it as useful as I do.
     
    http://www.manorts.com/alfred/Dualpane.alfredworkflow
  2. Thanks
    Colin reacted to deanishe in cannot find update zip   
    Typically, that means Safari couldn't look up the IP address of cachefly.alfredapp.com via DNS. Do you use DNS-based adblocking by any chance?
     
    It probably worked with your VPN because VPN typically gives you new DNS servers. If you continue to have issues, you could try changing your network settings to use alternative DNS servers by default, such as Google's (8.8.8.8 and 8.8.4.4).
  3. Like
    Colin reacted to iEnno in Open current Finder window in Terminal/iTerm and vice versa   
    So here's a workflow to open the current Finder window in Terminal or iTerm, depending on what you like to stick with. Also the other way round is possible.
     
    ft: open current Finder directory in Terminal tf: open current Terminal directory in Finder fi: open current Finder directory in iTerm if: open current iTerm directory in Finder For Path Finder fans:
     
    pt: open current Path Finder directory in Terminal tp: open current Terminal directory in Path Finder pi: open current Path Finder directory in iTerm ip: open current iTerm directory in Path Finder  
    GitHub.
    Direct Download.
     

  4. Like
    Colin reacted to thinkfilm in Dual Finder windows   
    I am using 10.12.3 on a late 2013 Mac Pro and the Dualpane workflow functions fine for me.  Two Finder windows line up correctly as specified by the default "bounds" with my default set to "icon" view.
  5. Like
    Colin got a reaction from Shark.Formax in Dual Finder windows   
    I dislike have to manually resize and position Finder windows, so after a little research I came up with this solution
    This workflow produces two Finder windows side by side, any size any position.
    Modify the script to suit your needs. Hope someone finds it as useful as I do.
     
    http://www.manorts.com/alfred/Dualpane.alfredworkflow
  6. Like
    Colin got a reaction from mixterdee in Dual Finder windows   
    I dislike have to manually resize and position Finder windows, so after a little research I came up with this solution
    This workflow produces two Finder windows side by side, any size any position.
    Modify the script to suit your needs. Hope someone finds it as useful as I do.
     
    http://www.manorts.com/alfred/Dualpane.alfredworkflow
  7. Like
    Colin got a reaction from surrealroad in Reminders   
    Thanks for the workflow Jack. Works really well on Alfred 3.
  8. Like
    Colin reacted to deanishe in Empty Trash Files Older Then NN Days   
    TL;DR What you're suggesting is a very clever solution. What I'm saying is that it might not be complete, depending on system configuration. It absolutely should work; you just might need to add actions to a few more folders.

    Finder sometimes lies about files and especially their names.
     
    If you open the real Trash in Finder and do Get Info, then open the Trash/.Trash hidden directory in your home directory and also do Get Info, you'll see they're not the same. In particular, there is no "Where" for the real Trash because it isn't a real folder:
     

     
    You can see that the "Trash" directory in your home directory is really called ".Trash" (which is what you see in a terminal). More importantly, you can see that not all files that are in the Trash are actually in the ~/.Trash folder.
     
    Any files you trash are moved to a special directory on the same partition. In the case of the partition your home directory is on, that's ~/.Trash. On other partitions, a subdirectory of the .Trashes directory at the root of the partition is used. The "missing" files in the screenshot are three directories, totalling a couple of gigabytes, that were on a different partition (/Volumes/Media in this case), so they are now in the /Volumes/Media/.Trashes/501 directory on that partition (501 is my user ID), not in ~/.Trash.
     
    That is to say, adding a folder action to ~/.Trash will work if your computer only has one drive and partition. If it has more, you will need to also add folder actions to the other directories that contain trashed files, otherwise they will sit in the Trash forever.
  9. Like
    Colin reacted to raster in Secure Empty Trash - Replicating Lost Functionality in El Capitan   
    Much to my dismay, El Capitan removed the Secure Empty Trash function from OS X. So, I've created a workflow to replicate that functionality using srm -rfm to both delete the data and overwrite with DOD-compliant garbage data. Empties the user trash, but does not delete ~/.Trash itself
     
    This is my first workflow, but I don't think I've done anything stupid.
     
    Secure Empty Trash by raster
     
    Icon designed by Freepik
  10. Like
    Colin reacted to deanishe in Updated to OS X 10.11 El Capitan - Script not working now   
    Escaping tells Alfred which characters need to be escaped, i.e. preceded with a backslash. Alfred's defaults for any given language are correct (but don't change the quotes around {query}!)
     
    When it replaces {query}, Alfred basically rewrites your script before running it.
     
    If there's something in {query} that would break the script or command or make it invalid, it needs to be escaped. If you have this script to copy a file to your desktop:
    cp {query} ~/Desktop  and the provided input is Some File.txt, Alfred will replace {query} with it and run:
    cp Some File.txt ~/Desktop  which will break because this command says "copy Some and File.txt to ~/Desktop" (the space delimits arguments).
     
    As a result, you instead use "{query}" (in quotes), so Alfred runs:
    cp "Some File.txt" ~/Desktop which is correct.
     
    In turn, this would break if {query} contained a double quote, e.g. Say, "hello!", as Alfred would expand "{query}" to "Say, "hello!"", closing the quotes and inserting the literal hello!, which the program would interpret as a command or variable, and break.

    So, you escape Double Quotes and Alfred instead expands "{query}" to "Say, \"hello!\"", which is once again a valid string.
     
    Finally, some languages do some extra processing of strings in double quotes. Certain escapes, like \n and \t, are expanded to newline and tab respectively. So you need to also escape Backslashes to prevent \n becoming a newline. Also, some languages, like PHP and bash, try to expand variables in double-quoted strings, e.g. in echo "Dear $name", they will replace the variable $name with its value (or nothing), so you need to escape Dollar, too.
     
    This kind of input may seem odd, but it's common enough for, say, a search engine workflow.
     
    If you just want to pass the user's query to your script, you should stick with the defaults for the language you're using. The only other meaningful configuration is escaping off, so you can compose your own commands in {query}. Anything other than defaults or off is probably broken in some way.
  11. Like
    Colin got a reaction from rheckart in Using ttab in a Terminal Command with Workflows   
    Not sure if this is exactly what you are after but it may help. It is an applescript I picked up somewhere.
    tell application "Terminal" activate -- Get a window that's not busy. -- If there are no open windows, open one. if (count of windows) is greater than 0 then repeat with currentWindow in windows if currentWindow is not busy then set targetWindow to currentWindow end if end repeat else do script "" set targetWindow to window 1 end if -- Do command 1. set firstCommand to "ls" do script firstCommand in targetWindow -- Open a new tab. tell application "System Events" to tell process "Terminal" to keystroke "t" using command down -- Do command 2. set secondCommand to "pwd" do script secondCommand in targetWindow -- And so on... end tell
×
×
  • Create New...