# System Tray Icon

**URL:** <https://www.ruby-forum.com/t/system-tray-icon/99538>\
**Category:** Ruby\
**Created:** [December 13, 2005, 12:50am UTC](https://www.ruby-forum.com/t/system-tray-icon/99538 "2005-12-13T00:50:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lstrecv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e68b1a/32.png) [@lstrecv](https://www.ruby-forum.com/u/lstrecv)\
**Post date:** [December 13, 2005, 12:50am UTC](https://www.ruby-forum.com/t/system-tray-icon/99538/1 "2005-12-13T00:50:28Z")

</div>

Any one know of a simple way to load an icon to the system tray via  
Ruby?

Ideally, I’d like cross platform, but would settle for Windows only.

My goal is to make a simple utility that runs in the background, runs  
the unit tests, and goes red or green. These are a dime a dozen for  
things like JUnit, but haven’t found one for Ruby.

---

<div class="post-metadata">

**Author:** ![lstrecv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e68b1a/32.png) [@lstrecv](https://www.ruby-forum.com/u/lstrecv)\
**Post date:** [December 13, 2005, 1:14am UTC](https://www.ruby-forum.com/t/system-tray-icon/99538/2 "2005-12-13T01:14:33Z")

</div>

On 12/12/05, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Any one know of a simple way to load an icon to the system tray via  
> Ruby?
> 
> Ideally, I’d like cross platform, but would settle for Windows only.
> 
> My goal is to make a simple utility that runs in the background, runs  
> the unit tests, and goes red or green. These are a dime a dozen for  
> things like JUnit, but haven’t found one for Ruby.

I don’t believe that there’s any cross-platform way to do this.  
Here’s how in Windows, though:

> **[ActiveState Community](https://community.activestate.com)**
>
> Community support for users of the ActiveState Platform.

The API call at play here is this:

> **[Technical documentation](https://learn.microsoft.com/en-us/docs/)**

You basically use String.pack to build the “NOTIFYICONDATA” data  
structure that the Win32 call expects.

–Wilson.

---

<div class="post-metadata">

**Author:** ![lstrecv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e68b1a/32.png) [@lstrecv](https://www.ruby-forum.com/u/lstrecv)\
**Post date:** [December 13, 2005, 11:30am UTC](https://www.ruby-forum.com/t/system-tray-icon/99538/3 "2005-12-13T11:30:56Z")

</div>

listrecv wrote:

> Any one know of a simple way to load an icon to the system tray via  
> Ruby?
> 
> Ideally, I’d like cross platform, but would settle for Windows only.
> 
> My goal is to make a simple utility that runs in the background, runs  
> the unit tests, and goes red or green. These are a dime a dozen for  
> things like JUnit, but haven’t found one for Ruby.

Here’s a thread from two weeks back with “system tray” in the subject  
line:

[http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-talk/167555?167445-168102+split-mode-vertical](http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-talk/167555?167445-168102+split-mode-vertical)

daz
