I want to indicate if port 3000 is used by any application. Port checking isn't a problem but I also need to update the indicator (I want to show the green or red circle) when port becomes busy/free.
I can create a new indicator like this:
require "ruby-libappindicator" indicator = AppIndicator::AppIndicator.new("test", "indicator-messages", AppIndicator::Category::APPLICATION_STATUS) indicator.set_menu(Gtk::Menu.new) indicator.set_status(AppIndicator::Status::ACTIVE) Gtk.main
Gtk.main call the code "hangs" so I can't call any other method.
How I can update the appindicator icon after its creation?