Jump to content

Jono

Member
  • Content Count

    164
  • Joined

  • Last visited

  • Days Won

    2

Reputation Activity

  1. Like
    Jono reacted to deanishe in Help with shell script workflow   
    {query} in the Notification is replaced with whatever you echo from your script. So if you put echo in the loop, it'll show all the destination paths.

    The simplest solution is probably to put echo -n "${fileName}" after done (the -n tells echo not to add a newline), and then select the "Last path component" option in the Notification's configuration.
  2. Thanks
    Jono reacted to vitor in Help with shell script workflow   
    for theFile in $@; do Make it
    for theFile in "$@"; do Or arguments may re-split on spaces. Even if Alfred takes that into account, it’s a good idea to do so anyway.
    outputFile=$"$HOME/Desktop/$fileName.jpg" What’s the first $ for? And use curly braces around variables, like you do in the rest of the script.

    Also, I recommend you use the long form of flags in scripts (-s → --setProperty), as you’ll understand them better later on.
    outputFile="${HOME}/Desktop/${fileName}.jpg" Finally, note that with the current implementation you may be overwriting files, which you likely want to avoid. This version will append a random number to end of the file name if the file already exists.
    for theFile in "${@}"; do fileName="$(basename "${theFile%.*}")" saveDir="${HOME}/Desktop" outputFile="$([[ -f "${saveDir}/${fileName}.jpg" ]] && echo "${saveDir}/${fileName}-${RANDOM}.jpg" || echo "${saveDir}/${fileName}.jpg")" sips --setProperty format jpeg --setProperty formatOptions 100 "${theFile}" --out "${outputFile}" open -a ImageOptim "${outputFile}" done  
  3. Like
    Jono reacted to andreas.w in Search and add bookmarks to Raindrop.io   
    This is a workflow for searching and adding bookmarks to Raindrop.io.
     
    To search your Raindrop.io bookmarks, open Alfred, type r, space, and then your search query, and the results will show directly in Alfred so that you can select one and press enter to open it in your browser. Raindrop.io collections and tags will also show in the search results together with bookmarks, and you can select them to browse or search their content. Before you have started to type a search query, you also have the option to browse your collections instead of starting with a search. If a web browser is the frontmost app when you open a bookmark from this workflow, it will open in that browser. If you are working in another app, the bookmark will open in your default browser. Hold the cmd-key to view the URL for a bookmark. Hold the ctrl-key to view the description for a bookmark. Hold the option-key while pressing enter, or use cmd+c to copy the URL instead of opening it in a browser. Press enter before you have started typing a search query, and Raindrop.io itself will open in your active web browser. To add a new bookmark to Raindrop.io, first make sure that you have the webpage you want to add opened in a browser and that it is the frontmost window, and then open Alfred and type ra followed by a space In the first step you choose collection for the new bookmark, and you can either type to search for the collection you want to add the new bookmark to or just select one in the list. Hold the cmd-key to save when you select the collection, and skip setting a custom title or adding tags. In the second step you get to change the title that the bookmark is saved with. Hold the cmd-key to save and skip the tag adding step. In the third step you get to add tags to your new bookmark. You can either simply type them out, or select from a list of tags that matches what you have started to type. Separate multiple tags with comma. Hold the cmd-key to save when selecting a tag in the list, and skip the option of adding more tags. The Firefox support for adding bookmarks was made possible with the help of deanishe's great workflow Firefox Assistant, which needs to be installed in Alfred for the Firefox support to function. Get it here: https://github.com/deanishe/alfred-firefox If the workflow is not authenticated with Raindrop.io when you initiate it, you will be taken to the authentication process. To set keyboard shortcuts, go to the "Search Raindrop.io" workflow in the Alfred preferences and look in the top left corner, where you can set keyboard shortcuts for searching Raindrop.io, or for adding bookmarks. To change other settings, go to the "Search Raindrop.io" workflow in the Alfred preferences, and click the [𝒙] button in the top right corner, where you get descriptions of the options in the information view to the left, and set the options by changing the value of the variables to the right.  
    One special thing with this workflow is that it detects if the topmost window is a browser window, and then opens the search results in that browser.
    So, if you are currently working in Firefox, your bookmark will open in a new tab there, and if you are currently working in Safari, or in Chrome, the bookmark will open there instead.
    If the topmost application is not a browser, the bookmark will be opened in your default browser.
     
    This makes this extension perfect for those who use more than one browser. You can always open bookmarks in the exact same way, and still have them displayed in the browser you are currently using.
     
    The supported browsers are: Safari, Chrome, Firefox, Edge, Brave, Vivaldi, Opera, Chromium, Chrome Canary, Safari Technology Preview (and SeaMonkey, but only for opening bookmarks)
     
    Download at Packal here: https://www.packal.org/workflow/search-raindropio
     
    View at GitHub here: https://github.com/westerlind/alfred-raindrop-search
     
    Changelog
    1.5: Many changes:
    Tags now display in search results, and you can select them to list or search for bookmarks with that tag When adding a new bookmark, you can now set your own title for it, and add one or more tags While adding tags, you can either simply type them out, or select from a list of tags that matches what you have started to type You can add more than one tag by separating them with a comma: tag1, tag2, tag3 If you type out a tag that does not exist yet, it is created when you save the bookmark Hold down the cmd key if you want to save right away when selecting a tag in the list. Just pressing enter leaves the option of adding more tags. If you want to skip the new options while adding a bookmark, hold the cmd key when you select collection or when you set the title, and the options that follow will be skipped and set to default (Title from the webpage, and no tags) When adding bookmarks, the description is now set to what is specified in the webpages meta description tag, if there is one. This means that in most cases you will get the same description for your new bookmark as what is seen as description for that webpage on search engines. If there is no meta description tag, no description is set. In search results, the collection name, tags and domain name of a bookmark is now shown in the subtitle instead of the first words of the description, like before. This is because that is likely more useful in most cases. You can view the description by holding the ctrl key (And there is a setting to change this back if you would want to, see below) There are now settings! You set them by changing Alfred Environment Variables, and there are now two of them for changing what the bookmark subtitles show, and for changing how subcollections are displayed. 1.4.1: Fixed a bug that would make the bookmark adding feature fail in many cases. If that didn't work for you before this, it probably does work now.
    1.4: Raindrop.io collections will now also show in the search results together with bookmarks, and you can select them to browse or search their content. Before you have started to type a search query, you also have the option to browse your collections instead of starting with a search.
    1.3.1: Fixed a bug that made the collection list not loading under certain conditions. For example the first time you tried to add a bookmark.
    1.3: Support for adding new bookmarks to Raindrop.io from the currently active browser.
    1.2: Added option to have a keyboard shortcut for direct access to the Raindrop.io search, and added the ability to hold the option key while pressing enter to copy the link instead of opening it in a browser (you could already copy the link with cmd+c before, and that is still possible)
    1.1: Implemented a proper authentication mechanism, so that this is now handled in a simple to use way that is initiated directly from the workflow if it senses that you are not authenticated yet.
    1.0: Uses Raindrop's new public API to make the search inside Alfred, so that you can open the bookmarks right from Alfred without having to ho through the Raindrop.io website first.
    0.9: First version. Could only open the Raindrop.io website to view the results of your query, as Raindrop's public API was not released yet
     
     

  4. Thanks
    Jono reacted to deanishe in How to change the web search icon to the safari icon   
    I've missed having you use my workflows, tbh. Whenever I released one, I always hoped you'd start using it, change all the icons to better ones and then give them to me to add to the next version
     
  5. Haha
    Jono got a reaction from deanishe in How to change the web search icon to the safari icon   
    I was trying to strip out parts of the workflow that I didn't want. I guess I 'stripped out' too much 😊
  6. Thanks
    Jono reacted to deanishe in How to change the web search icon to the safari icon   
    It's an unsigned binary. You need to grant it permission to run.
     
    https://github.com/deanishe/awgo/wiki/Catalina
  7. Like
    Jono got a reaction from gingerbeardman in Search Mac AppStore   
    Very useful, thanks!
     
    Is there any way for it to show the app prices in my own currency (£GBP) instead of $USD?
  8. Like
    Jono reacted to Andrew in Hide Result Subtext (Alfred Preferences > Appearance > Options)   
    For the upcoming 2.4 general release, I've added a modifier option to just show the actual default subtext (if not overridden by workflow):
     

  9. Like
    Jono reacted to Andrew in File System Navigation and Text Matching   
    This is now available in Alfred 2.4 b274 available as a beta build: http://blog.alfredapp.com/2014/07/25/alfred-v2-4-yosemite-fixes-and-many-improvements/
  10. Like
    Jono reacted to Andrew in Typeface options   
    Avenir, Avenir Next and Avenir Next Condensed (along with Helvetica Neue and Helvetica Neue Light) are being added to Alfred 2.4, falling back to Helvetica for older version of OS X or if these font's aren't installed.
     
    User defined fonts are coming in the future when I overhaul Alfred's theming system
  11. Like
    Jono got a reaction from Subject22 in Alfred icon location   
    Look inside /Applications/Alfred 2.app/Contents/Frameworks/Alfred Framework.framework/Versions/A/Resources
  12. Like
    Jono reacted to zhaowu in Alfred2 workflow for google search suggestion, instant search, and current site search   
    The initial motive is to automatically use current front browser's site for site search. Current it includes google suggestion, instant search, site search and related search.
     
    Suggestions are welcome.
     
    Check it out in Github: http://zhaocai.github.com/alfred2-google-workflow/
     
     
    It is also an example to use bundler to include gems in an alfred workflow. The command is bundle install --standalone.

    Usage 1. Search Suggestion
    Keyword g: provide google search suggestions based on {query}.
    2. Instant Search
    Keyword gi: get instant google search results in Alfred based on {query}.
    3. Site Search
    Keyword gs: get instant google search results of front browser's site in Alfred based on {query}.
    Supported browsers are: Safari, Google Chrome, Opera, OmniWeb, etc.
    You can use site:example.com query if you do not want to search for current front browser's site.
    4. Related Search
    Keyword related: get related google search results of front browser's site in Alfred based on {query}.
    Supported browsers are: Safari, Google Chrome, Opera, OmniWeb, etc.
    You can use related:example.com query if you do not want to search for current front browser's site.
    Installation
    Two ways are provided:
    You can download the Google.alfredworkflow and import to Alfred 2. This method is suitable for regular users.
    You can git clone or fork this repository and use rake install and rake uninstall to install. This method create a symlink to the alfred workflow directory: "~/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows". This method is suitable for developers.
    Reference
    Site Search Workflow for Alfred 2 Google Search in-line results workflow
  13. Like
    Jono reacted to targumanu in iCloud Tabs with search   
    This workflow allows you to view and open iCloud tabs from all your devices (except the current one).
     
    Unlike this workflow, my workflow also allows you to narrow the results using keywords. For example, entering "itabs apple iphone" will return only iCloud tabs whose page title or URL contains both "apple" and "iphone".
     
    You can also quickly open all your iCloud tabs using keyword "alltabs".
     

     
    Download
     
    This workflow uses the awesome Alfred Objective-C framework.
  14. Like
    Jono reacted to targumanu in Safari Reading List   
    This workflow allows you to view, open and add Safari reading list items.
     
    Features:
    View all your reading list items (keyword: RL). Search for specific items: Entering "rl apple iphone" will return reading list items whose page title or URL contains both "apple" and "iphone". View (and search) only unread reading list items (keyword: RLU). Add new items to your reading list (using keyword RLADD or hotkeys). Open all unread items (keyword: RLALL).   Direct download   Packal page   This workflow uses the awesome Alfred Objective-C framework.   Updates: v1.1: Option to view only unread Reading List items (default keyword: RLU).
      v1.2: Option to add new items to your reading list (keyword: RLADD).
    If the currently active app is a browser (Safari, Webkit, Chrome, Canary and Chromium are currently supported), you can just press Enter to add the URL of its active tab.
    You can also add URL's by typing or pasting.
    The workflow uses AppleScript to add new reading list items, so it requires Safari to be running.
    However, if Safari wasn't running, the workflow will quit it after it's done. (If you had no open windows in Safari, you won't even notice anything).
    Additionally, the workflow checks if the URL you are trying to add is valid by trying to download the <head> element of the corresponding page. So if you are disconnected from the Internet, or the page you are trying to add is unreachable, the workflow will consider the URL as invalid and won't add it.
    To make it add that URL without checking it for validity, use the modifier key (⌃).
      v1.3: Option to open all reading list items (keyword: RLALL).
      v1.4: The open all feature has been modified to open only unread items.
    (You can still open all your reading list items (including the read ones) by pressing Option.)
      v1.4.1: Fixed a typo
      v1.4.2: Fixed yet another typo
  15. Like
    Jono reacted to bigbadrabbit in Add reminders & tasks to Reminders.app   
    Thanks! Working now.   
  16. Like
    Jono got a reaction from bigbadrabbit in Add reminders & tasks to Reminders.app   
    There are already a few Alfred workflows out there for adding reminders and tasks to Reminders.app. Mine is about quickly adding tasks to different lists by typing the first letter of the name of the list, then the task or reminder.   Usage  
    Here’s some examples:       Typing ‘w finish the report' would add that task to the list named Work. Typing ‘r pick up dry cleaning sat at 6:30pm' would add that task to the list named Reminders with an alert set for 6:30pm on Saturday. Typing ‘g milk' would add that item to the Groceries list.   Because of my OCD the workflow will automatically capitalise the first letter of the task The workflow uses the best parsing engine, Fantastical's, so you’ll need to have that app to be able to use this workflow.   To show all of your lists type +r in Alfred       The workflow shows Notification Centre messages when items are added       Holding down the Option key when hitting Return it will open up the item in Fantastical. Otherwise hitting Return (without Option) will add the task without showing Fantastical.   Download: Add Reminders Alfred workflow   Setup The workflow comes with some pre-named lists:   Reminders Home Work Study Groceries   In the workflow editor delete ones you don’t want or duplicate them to create more. To rename the lists to match yours open the script part of the workflow ‘Run NSAppleScript’ on the right hand side and change the name and list colour (for Notification Centre) at the top between the double lines. To change the colour of a list icon shown in Alfred open the keyword part of the workflow (left hand side) and drag the icon from the ‘Alfred - Reminders List Icons’ folder into the image well.   The workflow uses MountainNotifier for the Notification Centre messages. Once downloaded place it in /usr/bin/   To do this, in Finder’s menu bar select Go > Go to Folder… (or hit Command-Shift-G) and paste in: /usr/bin/   Then place the ‘Automation’ folder (inside the ‘Notification Centre’ folder) in your ~/Documents folder.   (Ignore this if you don’t want to see Notification Centre messages.)     The idea for the Reminders list icons was blatantly pinched from LaunchBar 6        
  17. Like
    Jono got a reaction from morocons in Add reminders & tasks to Reminders.app   
    There are already a few Alfred workflows out there for adding reminders and tasks to Reminders.app. Mine is about quickly adding tasks to different lists by typing the first letter of the name of the list, then the task or reminder.   Usage  
    Here’s some examples:       Typing ‘w finish the report' would add that task to the list named Work. Typing ‘r pick up dry cleaning sat at 6:30pm' would add that task to the list named Reminders with an alert set for 6:30pm on Saturday. Typing ‘g milk' would add that item to the Groceries list.   Because of my OCD the workflow will automatically capitalise the first letter of the task The workflow uses the best parsing engine, Fantastical's, so you’ll need to have that app to be able to use this workflow.   To show all of your lists type +r in Alfred       The workflow shows Notification Centre messages when items are added       Holding down the Option key when hitting Return it will open up the item in Fantastical. Otherwise hitting Return (without Option) will add the task without showing Fantastical.   Download: Add Reminders Alfred workflow   Setup The workflow comes with some pre-named lists:   Reminders Home Work Study Groceries   In the workflow editor delete ones you don’t want or duplicate them to create more. To rename the lists to match yours open the script part of the workflow ‘Run NSAppleScript’ on the right hand side and change the name and list colour (for Notification Centre) at the top between the double lines. To change the colour of a list icon shown in Alfred open the keyword part of the workflow (left hand side) and drag the icon from the ‘Alfred - Reminders List Icons’ folder into the image well.   The workflow uses MountainNotifier for the Notification Centre messages. Once downloaded place it in /usr/bin/   To do this, in Finder’s menu bar select Go > Go to Folder… (or hit Command-Shift-G) and paste in: /usr/bin/   Then place the ‘Automation’ folder (inside the ‘Notification Centre’ folder) in your ~/Documents folder.   (Ignore this if you don’t want to see Notification Centre messages.)     The idea for the Reminders list icons was blatantly pinched from LaunchBar 6        
  18. Like
    Jono got a reaction from arsenty in Add reminders & tasks to Reminders.app   
    There are already a few Alfred workflows out there for adding reminders and tasks to Reminders.app. Mine is about quickly adding tasks to different lists by typing the first letter of the name of the list, then the task or reminder.   Usage  
    Here’s some examples:       Typing ‘w finish the report' would add that task to the list named Work. Typing ‘r pick up dry cleaning sat at 6:30pm' would add that task to the list named Reminders with an alert set for 6:30pm on Saturday. Typing ‘g milk' would add that item to the Groceries list.   Because of my OCD the workflow will automatically capitalise the first letter of the task The workflow uses the best parsing engine, Fantastical's, so you’ll need to have that app to be able to use this workflow.   To show all of your lists type +r in Alfred       The workflow shows Notification Centre messages when items are added       Holding down the Option key when hitting Return it will open up the item in Fantastical. Otherwise hitting Return (without Option) will add the task without showing Fantastical.   Download: Add Reminders Alfred workflow   Setup The workflow comes with some pre-named lists:   Reminders Home Work Study Groceries   In the workflow editor delete ones you don’t want or duplicate them to create more. To rename the lists to match yours open the script part of the workflow ‘Run NSAppleScript’ on the right hand side and change the name and list colour (for Notification Centre) at the top between the double lines. To change the colour of a list icon shown in Alfred open the keyword part of the workflow (left hand side) and drag the icon from the ‘Alfred - Reminders List Icons’ folder into the image well.   The workflow uses MountainNotifier for the Notification Centre messages. Once downloaded place it in /usr/bin/   To do this, in Finder’s menu bar select Go > Go to Folder… (or hit Command-Shift-G) and paste in: /usr/bin/   Then place the ‘Automation’ folder (inside the ‘Notification Centre’ folder) in your ~/Documents folder.   (Ignore this if you don’t want to see Notification Centre messages.)     The idea for the Reminders list icons was blatantly pinched from LaunchBar 6        
  19. Like
    Jono got a reaction from vdesabou in Add reminders & tasks to Reminders.app   
    There are already a few Alfred workflows out there for adding reminders and tasks to Reminders.app. Mine is about quickly adding tasks to different lists by typing the first letter of the name of the list, then the task or reminder.   Usage  
    Here’s some examples:       Typing ‘w finish the report' would add that task to the list named Work. Typing ‘r pick up dry cleaning sat at 6:30pm' would add that task to the list named Reminders with an alert set for 6:30pm on Saturday. Typing ‘g milk' would add that item to the Groceries list.   Because of my OCD the workflow will automatically capitalise the first letter of the task The workflow uses the best parsing engine, Fantastical's, so you’ll need to have that app to be able to use this workflow.   To show all of your lists type +r in Alfred       The workflow shows Notification Centre messages when items are added       Holding down the Option key when hitting Return it will open up the item in Fantastical. Otherwise hitting Return (without Option) will add the task without showing Fantastical.   Download: Add Reminders Alfred workflow   Setup The workflow comes with some pre-named lists:   Reminders Home Work Study Groceries   In the workflow editor delete ones you don’t want or duplicate them to create more. To rename the lists to match yours open the script part of the workflow ‘Run NSAppleScript’ on the right hand side and change the name and list colour (for Notification Centre) at the top between the double lines. To change the colour of a list icon shown in Alfred open the keyword part of the workflow (left hand side) and drag the icon from the ‘Alfred - Reminders List Icons’ folder into the image well.   The workflow uses MountainNotifier for the Notification Centre messages. Once downloaded place it in /usr/bin/   To do this, in Finder’s menu bar select Go > Go to Folder… (or hit Command-Shift-G) and paste in: /usr/bin/   Then place the ‘Automation’ folder (inside the ‘Notification Centre’ folder) in your ~/Documents folder.   (Ignore this if you don’t want to see Notification Centre messages.)     The idea for the Reminders list icons was blatantly pinched from LaunchBar 6        
  20. Like
    Jono reacted to sagishrieber in Export Sketch.app documents   
    This sounds amazing! I'll definately give it a try! Thanks Jono
  21. Like
    Jono got a reaction from paulw in Search DuckDuckGo Next With Google Suggest Completions   
    I prefer that, thanks again
  22. Like
    Jono reacted to paulw in Search DuckDuckGo Next With Google Suggest Completions   
    I made an additional change in my version of the script filter on my machine: I want to be able to search for the original term as entered if I don't like the search suggestions. I would have liked to be able to use a modifier key to do that, but couldn't figure out how, since the original {query} is no longer available and has been replaced by the search suggestions.
     
    So I cut out the fallback part of the script (if there are no suggestions) and instead added a first item to the results list that matches the original search term.
    require_once('workflows.php'); $wf = new Workflows(); $orig = "{query}"; $wf->result( 'ddgignoresuggest', $orig, 'Search DuckDuckGo for '.$orig, 'Search DuckDuckGo for '.$orig.' or search suggestions below', 'icon.png' ); $json = $wf->request( "https://duckduckgo.com/ac/?q=".urlencode($orig)); $json = utf8_encode($json); $items = json_decode($json,true); $int = 1; foreach($items as $item): foreach($item as $suggestion): $wf->result( $int.'.'.time(), "$suggestion", "$suggestion", 'Search DuckDuckGo for '.$suggestion, 'icon.png' ); endforeach; endforeach; echo $wf->toxml();
  23. Like
    Jono reacted to paulw in Search DuckDuckGo Next With Google Suggest Completions   
    Okay, I cobbled together something retrieves and parses DuckDuckGo's native search suggestions. Feel free to use it (or improve it) to update your workflow.
    require_once('workflows.php'); $wf = new Workflows(); $orig = "{query}"; $json = $wf->request( "https://duckduckgo.com/ac/?q=".urlencode($orig)); $json = utf8_encode($json); $items = json_decode($json,true); $int = 1; foreach($items as $item): foreach($item as $suggestion): $wf->result( $int.'.'.time(), "$suggestion", "$suggestion", 'Search DuckDuckGo for '.$suggestion, 'icon.png' ); endforeach; endforeach; $results = $wf->results(); if ( count( $results ) == 0 ): $wf->result( 'ddgsuggest', $orig, 'Search DuckDuckGo for '.$orig, 'No suggested matches, search DuckDuckGo for '.$orig, 'icon.png' ); endif; echo $wf->toxml();
  24. Like
    Jono reacted to moom in Scrennshot of web pages   
    Hello everybody, I create workflow to Scrennshot of web pages.
    This workflow use webkit2png from Paul Hammond. Webkit2png
    is a command line tool that creates screenshots 
    of webpages.
     
    Your screenshots you can find in your desktop.
     
    We have two choice: 
     
    1: Write address (without http://)
    2: Grab URL address from your Cipboard
     
    Download: from here
     

  25. Like
    Jono reacted to poritsky in Search DuckDuckGo Next With Google Suggest Completions   
    Just wanted to bubble up a new post to let you know I just updated my DuckDuckGo workflow from over a year ago to support the new (and lovely) DuckDuckGo Next. This is still a mod of David Ferguson's awesome Google Suggest Workflow. The only difference is that it uses DuckDuckGo Next to do the actual search. More details over on the candler blog.
     
    Download Google Auto Complete to DDG Next.zip
     
    DuckDuckGo Next actually has autocompletions, but I wouldn't know how to get those into the Alfred workflow yet. For now the autocompletions still go through Google Suggest.   Here's a vintage screenshot:
        Enjoy and happy searching!
×
×
  • Create New...