Jump to content

valrus

Member
  • Content Count

    4
  • Joined

  • Last visited

Everything posted by valrus

  1. Sigh: restarting fixed it, of course. Sorry, rookie move. Feel free to close this.
  2. I'm having an issue where Alfred is completely unresponsive on a second user account (I have a "main" account for personal use and a "work" account for when I work from home, and it's the latter under which Alfred doesn't work). It works fine under the main account. This is a couple weeks after my updating to Mojave, but it didn't happen immediately. Symptoms / related notes: I can launch Alfred Preferences. Alfred 3 shows up in Activity Monitor but the hotkey doesn't bring it up and the menubar icon doesn't appear (though I've enabled it in the Preferences); sometimes it becomes "(Not Responding)" in Activity Monitor after a short while, but inconsistently. Here are the console messages (filtered by term "alfred") that I see after trying to launch Alfred:
  3. I figured it out. The problem is that I was triggering the script filter with a hotkey, and I had incorrectly chosen "Pass through to workflow" rather than "Show Alfred" as the Action. I'm not totally clear on why this matters; since my script filter doesn't actually use its arguments when "Alfred filters results" is checked, why should it matter if I pass something in from the hotkey? If someone can explain that, it might help my understanding. But my main problem is solved.
  4. I'm working on a script to play music using MPD. I want to list available albums and have Alfred filter them rather than doing the filtering myself in a script filter. But when I check the "Alfred filters results" check box, the result is an empty list regardless of what I type: If, on the other hand, I uncheck that box, I get a list of albums as expected, but I can't type to filter them: Here's my code, in Python. It's really not very complicated: from __future__ import unicode_literals from __future__ import print_function import json import os import subprocess import sys MUSIC_DIR = '/Users/Shared/iTunes/iTunes Media/Music' FIND_CMD = [ '/usr/local/bin/mpc', 'list', 'album' ] def make_item(album_name): return dict( title=album_name, uid=album_name, valid=True, arg=json.dumps({'album': album_name}), icon='icon.png', autocomplete=album_name, ) def main(): print(json.dumps({ 'items': [ make_item(item) for item in subprocess.check_output(FIND_CMD).decode('utf-8').split('\n') if item.strip() ] })) if __name__ == '__main__': sys.exit(main()) Can anyone tell me what I might be doing wrong?
×
×
  • Create New...