How to output terminal command into a widget in OSX dashboard?

1

I want to have a way of outputting a terminal command, like:

$ cat todo.org | awk '{ print $1 }' > dashboard_widget

Into a dashboard widget, not necessarily the text output of a command. Maybe a "iTerm2" dashboard that only outputs but doesn't get input from the user.

What I want to do with this is to have the output of a emacs buffer with my todo list.

licorna

Posted 2012-05-02T15:16:25.683

Reputation: 471

What did you try so far? – Daniel Beck – 2012-05-02T15:32:05.020

Don't know where to start. Already googled by didn't find any solution. – licorna – 2012-05-02T16:38:06.813

My suggestion: Set up a cron or launchd job to periodically transform your todo list like in the example you provided into an output file. Display that file's contents in a widget by getting a script's (cat comes to mind) output. This should help. Dashcode is part of Xcode.

– Daniel Beck – 2012-05-02T17:02:58.183

Answers

3

There are dashboard widgets that execute shell scripts and display the output.

Examples:

Your script can call emacs in batch mode to preprocess and export your todo.org into plain text mode, or you can use your awk preprocessing instead.

Juancho

Posted 2012-05-02T15:16:25.683

Reputation: 2 187