Jump to content

ManicDee

Member
  • Posts

    6
  • Joined

  • Last visited

Posts posted by ManicDee

  1. Apologies for the thread necro, this is the first result for "alfred command space hot key".

     

    I had Alfred 2 running quite happily with Command+Space as the hotkey. Then I upgraded to Alfred 3 and could no longer use the Command+Space hot key. I launched Alfred 2, set Alfred 2's hot key to Ctrl+`, but still no luck with Alfred 3. Turns out that Command+Space was being used by OS X for "switch input source" (even though I only have one defined). I un-checked the boxes for "next input source" and "previous input source" and now Alfred 3 can use Command+Space. In addition, the options for "next input source" and "previous input source" are no longer available in Keyboard > Shortcuts.

     

  2. Is there a way to tie my shell/python/whatever script in with Alfred's "Lock" action?

     

    In the immediate instance, I'd like to clear all SSH keys and revoke sudo access when I lock the console. The shell commands to achieve this would be "ssh-add -Dx ; sudo -nK". For my purposes it wouldn't matter whether the script gets run before or after the console is actually locked.

     

  3. Sometimes I want custom SSH terminals. For example if I need to access a production web server for some reason, I'd like to have a terminal set up with a (dark) red background and a different font to normal which should remind me that I'm on a production server, so I should be careful.

    1. Set up the appropriate configuration in ~/.ssh/config (for this example, 'Host manicdee-production-web')
    2. Set up a custom terminal setting, and give it a meaningful name (for this example manic@production-web)
    3. In the terminal settings, under "Shell" type "ssh manic@production-web" into the "Run command" box

    Now when I want to access that server, I can summon Alfred and issue "term manic@production-web" and I'll get the custom red terminal.

     

    If only I could combine this terminal control workflow with the SSH workflow …

  4. I'm a different Alex, but just letting you know this workflow is pretty darned neat :)

     

    Working exactly as advertised on OS X 10.9.5.

     

    Once I got home, Alfred had Terminal Control Workflow installed due to Dropbox syncing. There was no request to allow Alfred to control my computer for me (update: probably because the script was crashing, see below).

     

    The "term" keyword wasn't working: I was expecting that typing "term " would result in Alfred displaying a list of terminal settings to choose from (i.e.: Solarized Dark, Solarized Light, etc) but nothing was there. I turned on debugging in Alfred and got this message when starting to type "term":

     

     

    [ERROR: alfred.workflow.input.scriptfilter] Code 1: terminal-control.rb:31:in `split': invalid byte sequence in US-ASCII (ArgumentError)

    from terminal-control.rb:31:in `<main>'

     

    So I'll go checkout the source version and see if I can't figure out what's going on here.

     

    Edit: nevermind, I was going to post a list of my current settings and realised that "split" is choking on "ManicDee’s Settings" (with a curly apostrophe).

     

    If I update the script such that term_settings = `…` is replaced with term_settings = "ManicDee’s Settings," I will get the expected behaviour (i.e.: "term " brings up a list of terminal settings). Saving the AppleScript to a separate script and running it from the command line provides the expected Unicode output (at least, it looks that way).

     

    Sorted! It was Ruby treated all input as ASCII 7-bit by default. I have submitted a pull request, which simply adds "Encoding.default_external = Encoding::UTF_8" at the top of terminal-control.rb.

     

    WFM, YMMV.

  5. To allow Unicode characters:

    set the clipboard to "{query}" as text
    
    tell application "Calendar" to activate
    
    tell application "System Events"
    	keystroke "n" using {command down}
    	keystroke "v" using {command down}
    	keystroke return
    end tell
    
    

    Note that we're side-stepping the text entry by simply pasting the Unicode string into the field that is already selected.

  6. As a Quicksilver user, I have a number of bookmarks such as "dotlan" -> "http://evemaps.dotlan.com/search?q=***"

     

    The Quicksilver Web Search plugin will take my query terms, do the necessary URL escaping (including encoding spaces as "+"), put my query where the *** is, then open a Safari window with the search URL.

     

    Would it be possible for Alfred to either use these bookmarks in-situ, or import them as custom searches?

     

    Of course if it this facility is already available (i.e.: there's a script out there that already converts Quicksilver search bookmarks to Alfred custom searches) please let me know?

     

×
×
  • Create New...