Jump to content

zhaowu

Member
  • Posts

    98
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by zhaowu

  1. As title, I would like to activate some automator workflow and service from Alfred!
  2. Please goto http://zhaocai.github.com/alfred2-ruby-template/ for detailed instruction. Suggestions are welcome! Example Projectsalfred2-top-workflow alfred2-google-workflow Main features:Use standard bundler to easily package, manage, and update ruby gems in the workflow. Friendly exception and debug output to the Mac OS X Console Automate rescue feedback items to alfred when something goes wrong. Alfred workflow and feedback related functions are located in a separate alfred-workflow gem which can be easily installed by addinggem "alfred-workflow" in the Gemfile. Functions for smart case query filter of feedback results. Functions for finding the bundle ID, cache and storage paths, and query arguments. Functions for reading and writing plist files. Functions to simplify generating feedback XML for Alfred. Functions to simplify saving and retrieving settings.
  3. Actually, live feedback is what I meant. The reason for me is that some script are slow to finish.
  4. One more question, Is it possible to feedback multiple times to Alfred? Specifically, output xml items multiple times.
  5. Thanks for your help! I guess I know what is wrong. The feedback items are not valid. They are for autocompletion.
  6. It is the same each time. something like 'bundle-id:someid' .
  7. Question about uid and feedback items order: "Give your results a unique identifier and Alfred will learn which ones you use the most and prioritize them by moving them up in the result list." I tried to give unique uid for feedback each items. However, after I activated some of the items many times, Alfred does not "prioritize them by moving them up in the result list".
  8. 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
  9. update: Use full command line for command like java, ruby, python, etc.
  10. If the item does not support QuickLook, show nothing.
  11. Yes, "while Quicklook is active, press up/down to Quicklook previous/next item"
  12. Normally, kill a process means to send a signal to the process and let it finish it up and quit. It is safe. Force Kill means to send '-9 KILL (non-catchable, non-ignorable kill)' signal to kill the process. Normal it is not recommended to do that unless the process is hung or not responding. You may lose data by this.
  13. Alfred 2 Top Process Workflow The initial motive of this workflow is to avoid frequent visits to the Activity Monitor when the fan goes loud. Now it has been evolved with two major features: Suggestions are welcome. And Please go to http://zhaocai.github.com/alfred2-top-workflow/ for better view of the installation instruction. - 1) List/Kill Top Processes by Memory/CPU/IO Usage - 2) (working in progress) Get a glance of system status including internal battery, fan speed, CPU/GPU Temperature, bluetooth battery, disk capacity, etc. Usage 0. Show Help Just type -?, -h, or --help after the keyword to show help. 1. Top Processes A. Keywords: 1.) top: Show a mixed processes list based on top cpu/memory usage. 1. top -m, top --memory to show processes ranked by memory usage 2. top -c, top --cpu, to show processes ranked by cpu usage 3. top -i, top --io, to show processes ranked by io usage with callback from top io trace collector. Top IO requires [DTrace][Dtrace] and it would take a while to finish. The new callback design is to run the job in he background and post a notification (OSX 10.8+) using notification center. Click on the notification to show the result in alfred. Modifier Key - none : The default action is to list files opened by process ID - control : Kill the selected process - command : kill forcefully (kill -9) - alt : Nice (lower) the selected process's cpu priority - shift : Search web for process information 2.) kill: Filter process to kill. Modifier Key - none: The default action is to kill by process ID - command : kill forcefully (kill -9) 3.) lsof: List files opened by process id Modifier Key - none: The default action is to reveal file in Finder B. Filter by Query 1.) To search for process state, use :idle, :sleep, :stopped, :zombie, :uninterruptible, :runnable, etc. 2. Glance an Eye on your system #### A. Keywords: glance: Show system information including internal battery, bluetooth battery, disk capacity, etc. B. Change Display Order Activate Alfred Preferences → Advanced → Top Result Keyword Latching Hit Enter for the feedback item you wish to show up on the top. Installation Two ways are provided: You can download the Top Processes.alfredworkflow and import to Alfred 2. This method is suitable forregular users. You can git clone or fork this repository and use rake install and rake uninstall to install. Check rake -T for available tasks. This method create a symlink to the alfred workflow directory: "~/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows". This method is suitable fordevelopers. Troubleshooting 1. Does not work in Mac OSX 10.9 (Maverick) In OSX 10.9, the system ruby is upgraded to 2.0.0. You need to download the new version of this workflow which packs the ruby gems for 2.0.0 inside. If the downloaded version does not work, try 1.) open Terminal.app. If you use rvm or rbenv, switch to the system ruby. run cd "$HOME/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/me.zhaowu.top" && rake bundle:update 2. iotop causes mouse lagging This issue is not caused by this workflow but by [DTrace][DTrace]. The related system log message is IOHIDSystem cursor update overdue. Resending.. In my Macbook Pro, any [DTrace][DTrace] based program will introduce this issue including the mac built-in /usr/bin/iotop, and /Applications/Xcode.app/Contents/Applications/Instruments.app . I upgrade to OS X 10.9 and this issue is resolved. 3. Encoding::CompatibilityError: incompatible character encodings: ASCII-8BIT and UTF-8 Add the following contents to /etc/launchd.conf. Restart is required. setenv LANG en_US.UTF-8 setenv LC_ALL en_US.UTF-8
  14. Thanks! It is working now. one improvement i would suggest is the notification message - it is too long. It would be better to just show succeed or fail. Thanks!
  15. Yes, I do use ssh keys to avoid login. Is that a issue?
  16. two issues: multiple files action: only the first one get transferred. no notification. possibly because the {query} is empty
×
×
  • Create New...