Permalink
Browse files

Added support for iChat as an alternative to Adium

  • Loading branch information...
1 parent 39e3989 commit b82200a97f1f83d79b4cdc6a17c04f5853fd16bc @nielsm nielsm committed Mar 3, 2010
Showing with 24 additions and 0 deletions.
  1. +19 −0 actions/ichat_status.rb
  2. +5 −0 config.rb.sample
View
@@ -0,0 +1,19 @@
+class IchatStatus < CapreseAction
+ include Appscript
+
+ config_schema({:away => String, :available => String})
+
+ def start
+ ichat_accounts.status.set(:away)
+ ichat_accounts.status_message.set(config[:away])
+ end
+
+ def stop
+ ichat_accounts.status.set(:available)
+ ichat_accounts.status_message.set(config[:available])
+ end
+
+ def ichat_accounts
+ @ichat_accounts ||= app("iChat").services
+ end
+end
View
@@ -44,6 +44,11 @@ AdiumStatus(
:available => "Available"
)
+IchatStatus(
+ :away => "Pomodoro! Ends at #{stop_time.to_short_time}",
+ :available => "Available"
+)
+
Campfire(
:start_message => %(< #{MY_NAME} started "#{description}": #{start_time.to_short_time} - #{stop_time.to_short_time} >),
:stop_message => "< #{MY_NAME} ended >",

0 comments on commit b82200a

Please sign in to comment.