Jump to content

roylez

Member
  • Posts

    6
  • Joined

  • Last visited

roylez's Achievements

Helping Hand

Helping Hand (3/5)

0

Reputation

  1. The PID part can be easily fixed. But I tried putting the script into background, "stop" command still does not work.
  2. It does work from terminal. Below is what I get in debugger. It looks like the message is sent to output script and notification, but the script does not run. Moving the script from output layer to action, the problem persists. </item> </items> [INFO: alfred.workflow.input.scriptfilter] Processing output 'alfred.workflow.output.notification' with arg 'stop 7086' [INFO: alfred.workflow.input.scriptfilter] Processing output 'alfred.workflow.output.script' with arg 'stop 7086' It is fair simple to reproduce. In Alfred, run "pmd start xxxx" Type "pmd", and the first option item will list current running session, select it, and a "stop" arg will be sent to the output script ( to invoke "ruby ./pomodoro.rb stop" ) In terminal, "ps -ef |grep pomodoro" will tell if a "ruby ./pomodoro.rb start xxxx" is still running. If it is, then the script in step #2 is not invoked. Typing "ruby ./pomodoro.rb stop" in terminal will kill the session aforementioned.
  3. Hi Andrew, I have tried your suggestion but still no luck. By the way, there is no such option "run instances of this script: sequentially" here, but I do not think this would make any difference.
  4. I agree the update is infrequent and slow, but if the directory structure is expected not to change too frequently I do not think it would be a big issue. As for the second problem, you can always prepend "document" in your search pattern to limit results to ones that have "document" in their full path.
  5. How about considering `locate`? As long as you are not dealing with newly created files, locate is more convenient if you could make some preparation work... Here is how I search files in my directory. In crontab, the following line updates a locate database of my personal files. 5 * * * * SEARCHPATHS=$HOME FCODES=~/.locate.db updatedb In my ~/.zshrc , the following first defines a function to make search like "locate_private A B" return anything matches "A*B". So if I type "l apple pdf" in command line, anything with apple and pdf in the middle of their full path would be returned immediately. function locate_private() { pattern="*${*// /*}*" locate -i -d ~/.locate.db "$pattern" } alias l=' locate_private' If your workflow is for yourself only. I think adding one extra line to your cron table is not too bad.
  6. Hi, I have a small workflow for pomodoro sessions. The idea is simple, a script filter sends either "start" or "stop" arg to an output script start or kill a running pomodoro timer. The "start" keyword works as expected, but "stop" never works. In debug window, I can see "stop" is indeeded sent, but somehow the script does not run. In command line, I can use whatever I have in the script to do exactly expected. Is there anything wrong with my scripts, or anything with my understanding of alfred's messaging mechanism? github link: https://github.com/roylez/alfred_pomodoro Thank you~
×
×
  • Create New...