Jump to content

Yuri

Member
  • Posts

    29
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Yuri reacted to deanishe in Pass Script Output to Script Filter   
    That's not how a Script Filter works.
     
    Alfred reads the JSON from your Script Filter's script and shows the results to the user. If the user selects a result, the value of that item's arg is sent to the next element (Copy to Clipboard etc.).
     
    A Script Filter that isn't connected to anything generally isn't very useful because it only shows stuff, but doesn't do anything with it.
     
     
    Please don't post scripts. Upload the entire workflow somewhere (Dropbox?) and post a link, so we can see what's really going on. We generally can't say why a workflow doesn't work without the workflow.
     
     
    Except in this case your JSON is obviously invalid. Alfred is certainly showing an error message in its debugger that says as much. You have to quote the values, not just the keys, each title-arg pair needs to be in its own object, and you also mustn't have a trailing comma after the last entry in an array or object.
     
    The JSON should look more like this:
     
    { "items": [ { "arg": "https:\/\/www.alfredapp.com\/blog\/", "title": "Alfred Blog - Productivity Tips & Tricks and Alfred News" }, { "arg": "https:\/\/www.alfredapp.com\/blog\/category\/tips-and-tricks\/", "title": "Tips and Tricks - Alfred Blog" } ] }  
    You shouldn't even try to cobble your own JSON together in bash, tbh: it's almost impossible to get it right (not least because of the trailing comma rule). Use a proper scripting language that has real support for JSON. Python, Ruby etc.
     
  2. Like
    Yuri reacted to nikivi in Open Contacts App from Alfred   
    If I may, I would love to bring this thread to attention as it is a bit relevant to searching of Contacts
     

    I very often search people by contact name to open their Twitter/GitHub and such customizable actions would save me quite a bit of time. 🧡
     
  3. Like
    Yuri reacted to rspike12 in Alfred Maestro - Keyboard Maestro Integration For Alfred   
    it doesn't work anymore on Alfred 3
    Any help will be appreciated 
  4. Like
    Yuri reacted to vitor in WebScreenshots — Take screenshots directly to the web   
    This workflow is officially deprecated in favour of Screenshots
     
    Take screenshots with and upload them directly to imgur, copying the resulting link to the clipboard.



    In addition to the Hotkey, you may upload an image or video by picking the Upload Screenshot File Action.

    uploadscreenshotclipboard uploads the most recent image data in your clipboard.

    savescreenshotclipboard saves the most recent image data in your clipboard to the Desktop.

    recentscreenshots enumerates recently uploaded screenshots, ordered from the last. You can then open them in the browser to view (↵), delete (⌘↵), copy (⌥↵), or preview (⇧).
  5. Like
    Yuri reacted to nikivi in Automating Alfred Preferences with KM palettes   
    Automating Alfred Preferences
     
    I have always hated how in Alfred Preferences there were really no hotkey support for making things and you had to use your mouse for creating workflow objects or do any kind of interaction to make the workflows.
     
    I have however managed to fix this by using Keyboard Maestro app to make macros to both create workflow objects from the keyboard alone as well as do common operations like opening debugger, changing workflow version number, making notes and a lot more.
     
    I put all the different actions for creating workflow objects in a palette.
     
    To better demonstrate everything, I made a YouTube video that you can watch below:  
     
     
     
    Download
     
    Here is the repository where you can download these alfred palette and the macros for using in Alfred:
     
    https://github.com/nikitavoloboev/my-mac-os/tree/master/km 
     
    I hope you find it useful. Feel free to comment and I would love to hear your thoughts on it or perhaps on ways that you guys have automated using the Alfred Preferences editor itself. ? 
     
     
     
     
     
  6. Like
    Yuri reacted to nikivi in A way to boost your productivity with Karabiner   
    Hey @politicus
     
    My Karabiner configuration is not supported on your macOS version. You have to use Karabiner Elements and I am not sure how my configuration translates to in there, if I did I would update my macOS.
     
    Sticky keys are simply custom modifier keys I set up for myself. You can read more about it here. ? 
     
    Also take a look here. Some people, shared their sticky key configuration that works in Karabiner Elements.
  7. Like
    Yuri reacted to eriksatie in Prioritize actions in a workflow   
    Hi, I'm totally new to Alfred and to workflows. and also to scripting 
     
    I bought Alfred to create shortcuts for setting some simple "work environments". that means to close unused apps, open needed apps, documents and webpages. It should be easy!
     
    I've done some experiment and I've successfully created a workflow with a trigger and two actions. the first action is an Apple  script that quite some applications:
     
    on alfred_script(q)
      tell application "Safari" to quit   tell application "Google Chrome" to quit   tell application "Mail" to quit   tell application "Contacts" to quit   tell application "Calendar" to quit   tell application "Evernote" to quit   tell application "Reminders" to quit   tell application "Safari" to quit   tell application "Notes" to quit   tell application "Finder" to quit end alfred_script   the second is an Open Url Action that open a web page on Chrome. The idea is to close all unused tabs on Chrome and open just the ones I need.   now the problem is that I'm not able to tell Alfred that as first it should execute the Apple Script, and after that it should reopen Chrome and load the web page. Any advice on this?   
  8. Like
    Yuri reacted to JimmyTheSaint in How to make the Alfred search window a frontmost app   
    I posted my K-E launcher at https://gist.github.com/Jimmy34742/7be28de581e706c37b059b395bf8900f
     
    It uses spacebar and tab as sticky keys. The organization is:
    spacebar + letter => application
    spacebar + number => folder or file
    spacebar + shift + number => a logically (to me) different category of folder or file
    tab => URL's, Alfred workflows and (I intend) LaunchBar actions
    (future) tab + spacebar => workflows and actions and tab (above) only launches URL's.
     
    All suggestions and comments welcome.
  9. Like
    Yuri reacted to deanishe in How to make the Alfred search window a frontmost app   
    @nikivi, @JimmyTheSaint Here's Niki's epic post (the thread is hidden, not deleted):
     
    If you really care about saving keystrokes, I advise you to look into Karabiner.

    I have over 500 or so workflows I use and I can access anyone of them from one keystroke. Just one. 
     
    I nearly never use Alfred default (cmd + space) interface (It is single press of right command or jl keys together for me). Because Alfred has this awesome feature of making super focused searches for anything I wish to search and creating external triggers for them I can then call from Karabiner.
     
    So there is literally no use to have default search aside from opening some applications which I also open from single keystroke in Keyboard Maestro.
     
     
     
    The most exciting thing about Karabiner and making every key on the keyboard into a modifier key is that there are literally thousands of keys you can fill and customise. Where accessing any one of these keys (which can map to workflows / Keyboard Maestro macros ..) is literally 1 second away. Compared to (1. opening Alfred 2. searching for trigger).
     
    It's kind of insane if you think about what it really enables you to do. You can even create extra virtual layers of keys with Keyboard Maestro palettes. For example I have space key modifier to accessing different palettes. I can then space (held) + e and quickly enter an emoji insert palette:
     
     
    So inserting ? is space + e + a and emoji is there. And in case I forget what key ? is. The palette can remind me. So you can do anything you can dream of in two-three keystrokes. Of course emoji palette is just an example, you can run some more complex macros or workflows if you so wish.
     
    Just as an example, because this forum uses some weird markup and is not markdown, I am forced to use @vitor's MarkdownTransform workflow. So I can then just select some text and press t + b and it will convert the selected text into BBCode. Where t is my modifier and b is the action key to press if t is held down (b for BBCode). If I didn't have Karabiner, I would either will need to remember some cryptic hotkey like ⇧⌘⌃+B or something. Because hotkeys are scarce and they will run out quickly. Or open Alfred and start searching for a trigger to do this but that takes too many keystrokes.
     
    Setting @deanishe's Searchio to JK pressed together and J + : pressed together to access currently open Safari tabs with Safari Assist is life changing already. Or LM to search my safari bookmarks and LN to search chrome bookmarks. Or setting s + hjkl to mimic arrow keys (How about vim everywhere?). This list goes on.
     
    It's quite strange but I sometimes check on the internet if anyone actually uses Karabiner too in this way and I never found another person. Would be awesome to see other people's setups and what they made.
  10. Like
    Yuri reacted to Michael Kalygin in Yandex Translate Workflow   
    This workflow allows to use Yandex Translator from Alfred.
     
    The only dependency is Node.js.
    See detailed usage description in GitHub repo.
     

  11. Like
    Yuri reacted to nikivi in A way to boost your productivity with Karabiner   
    This is not necessarily a workflow I am sharing but something I use that I love and would really love to share with you. It allows me to use and manipulate all the great workflows you kind people have created and share and use them seamlessly. It also allows me to spike up my usage stats by some pretty wild numbers : 
     

     
    The reason is that I don't ever really activate anything using hotkeys any more. I use something called 'sticky keys' and I have achieved using Karabiner. [Here](https://github.com/nikitavoloboev/dotfiles/tree/master/karabiner) is my repository with my config file for Karabiner. I have also put a readme in there to show how I use it and what for. You can just clone the repository and use the settings and change them to what you consider best for you.
     
    I hope you will like it too. Tell me what you think of it and if you managed to get it to work. You can ask any question you have about the config file I have as it is pretty lengthy.
     
  12. Like
    Yuri reacted to mrSLK in File 'Quick look' suggestion.   
    I'm actually looking to do the same thing as well without pressing the Shift Button, is there any answer/solution/suggestion for this ? 
  13. Like
    Yuri reacted to joonas in File 'Quick look' suggestion.   
    This has always been something that bothered me. I'd love if if I could preview/navigate the search results just like you can on Finder.
     
    In finder you press space (or what ever) to preview and then you can use arrow keys to move to another file without having to close and open the preview window in between.
     
    If I'm trying to find a file based on the visual contents in Alfred I have to basically:
    Shift ( Open ) Shift ( Close ) Arrow Down Shift ( Open ) Shift ( Close ) Arrow down Shift ( Open ) Shift ( Close ) and so on... until I've found the file I'm looking for or I ran out of files to preview.  
    It would be easier if I could just press arrow down (or up) while the preview window is open.
  14. Like
    Yuri got a reaction from mutasem in Cheatsheet - shortcuts for your tools   
    Awesome!
     
    Would it be possible to add:
    - Photoshop
    - Illustrator
    - Sketch
     
    Thank you!
  15. Thanks
    Yuri reacted to mutasem in Cheatsheet - shortcuts for your tools   
    Cheatsheet
    Alfred workflow that gets shortcuts for applications, websites, tools and others. Use the keyboard more.
    Github repo
    workflow file
    Supported right now
    Alfred AutoMute Chrome extension Evernote Finder Firefox Google Chrome IntelliJ Idea (default Mac OS X) Mac OSX Microsoft Word Outlook Reddit Enhancement Suite Safari Slack Sublime Text Terminal Video Speed Controller chrome extension Vim Vintage Sublime github.com iTerm2 inbox.google.com trello.com youtube.com

    I focused on the stuff I use everyday to start with. Let me know what tools you would like this to support. Or better make a pull request with it.
  16. Thanks
    Yuri reacted to vitor in add a quick glance feature when active Alfred   
    You can, kind of. A bit hacky and it relies of emulating key presses, but it works.
     
    You simply start calling Alfred with a shortcut that will actually tell it to launch a workflow. You’ll also tell it to select all the text so you can just start typing (erasing what was there).
     
    Overview

     
    Script Filter

     
    Run Script

     
    And here it is to download.
  17. Thanks
    Yuri reacted to RodgerWW in Open link on background, in Safari, staying on the same tab   
    Try this with AppleScript :
    set myURL to "https://www.google.com" -- Replace URL with your own or with the {query} tell application "Safari" tell front window make new tab at end of tabs with properties {URL:myURL} end tell end tell  
  18. Thanks
    Yuri reacted to deanishe in Open links from csv document.   
    Use this script instead. It deletes the URLs after opening them.
    # encoding: utf-8 from collections import deque import os import subprocess import sys csvfile = os.path.expanduser('~/Desktop/links.csv') # load all URLs urls = deque() with open(csvfile) as fp: for line in fp: line = line.strip() if line: urls.append(line) count = 0 if len(sys.argv) > 1: count = int(sys.argv[1]) if not count or count > len(urls): count = len(urls) # open URLs i = 0 while True: if i == count: break url = urls.popleft() subprocess.call(['/usr/bin/open', url]) i += 1 # write remaining URLs back to file with open(csvfile, 'wb') as fp: fp.write('\n'.join(urls))  
  19. Thanks
    Yuri reacted to deanishe in Open links from csv document.   
    Then use this script instead:
    # encoding: utf-8 import os import subprocess import sys csvfile = os.path.expanduser('~/Desktop/links.csv') count = 0 if len(sys.argv) > 1: count = int(sys.argv[1]) urls = [] with open(csvfile) as fp: for i, line in enumerate(fp): if count and i == count: break urls.append(line.strip()) for url in urls: subprocess.call(['/usr/bin/open', url])  
  20. Like
    Yuri reacted to deanishe in Open link on background, in Safari, staying on the same tab   
    Not really, no. Alfred can't possibly guess which URLs you want to open, so you have to write them down somewhere.
     
    A better solution than snippets would probably be a List Filter.
  21. Like
    Yuri 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
  22. Thanks
    Yuri reacted to vitor in Url page+1 with shortcut   
    I’ve updated the code in the previous reply. Here’s the updated Workflow. If it cannot find a number at the end of the URL, it’ll just append &page=2.
  23. Like
    Yuri reacted to vitor in Url page+1 with shortcut   
    const browser = Application('Safari') const current_tab_url = browser.documents[0].url() const base_url = current_tab_url.substring(0, current_tab_url.lastIndexOf('=') + 1) const current_number = current_tab_url.substring(current_tab_url.lastIndexOf('=') + 1, current_tab_url.length) const next_number = Number(current_number) + 1 if (isNaN(next_number)) { browser.documents[0].url = current_tab_url + '&page=2' } else { browser.documents[0].url = base_url + next_number }  
  24. Like
    Yuri reacted to FroZen_X in Multiple paste of Files from Clipboard history   
    Hello everyone,
     
    it would be pretty cool if it would be possible to select multiple Files, Clips or whatever from the Clipboard history and paste it.
    For instance:
     
    I would have copied a few files and wanna paste them. Here is an example:

     
    If i could now just press Shift+Arrow down to select multiple items and then just paste them that would be awesome 
    If there is another way then lemme know, but else this would be decent to have.
     
    Another addition to that would be the ability to change the Shortcut for adding files to the file buffer. Something like
    ⌘+C and ⌘+V would make the file Buffer/Navigation even better
     
    Cheers,
     
    Frozen
  25. Like
    Yuri reacted to vitor in Hackerboard — Links from the front page of Hacker News   
    Usage

    Search the Hacker News front page via the hnf keyword.



    Press ↩ to open the story’s website or ⌥↩ to open the Hacker News comments thread. This behaviour can be reversed in the Workflow’s Configuration.

    Seach stories with the hns keyword.



    Previous shortcuts apply, plus ⌘↩ switches between ordering by date (more recent first) and by relevance (then points, then number of comments).

    Submit the frontmost browser tab with the hnsubmit keyword.



    ⤓ Install on the Alfred Gallery | Source
×
×
  • Create New...