Ruby bindings for libappindicator used by Ubuntu’s Application Indicators released under the LGPLv3 license
This is my first C extension and my first gem so please consider this as beta version. It works on my computer, but I can’t guarantee it will on yours. Any help will of course be appreciated, especially for proper gem packaging.
This gem uses the same version numbering than libappindicator itself for major and minor, micro is used for bugfixes and gem enhancements. Right now libappindicator-0.1 is available which means it will be supported by ruby-libappindicator-0.1.x .
require "rubygems" require "ruby-libappindicator" ai = AppIndicator::AppIndicator.new("test", "indicator-messages", AppIndicator::Category::APPLICATION_STATUS); ai.set_menu(Gtk::Menu.new) ai.set_status(AppIndicator::Status::ACTIVE) Gtk.main
The two necessary steps to make your application indicator visible are:
-
setting a menu (even empty, but you need one)
-
setting the status as active or requiring attention
In order to build ruby-libappindicator you need to have the GTK+ and libappindicator development headers
$ sudo apt-get install libgtk-directfb-2.0-dev libappindicator-dev $ gem install ruby-libappindicator
-
Write/generate some documentation