Sha256: 7a6a875355c9a6242d4497f020dfdda2d60cfb36f3c4a852c21676b87d06f70c
Contents?: true
Size: 517 Bytes
Versions: 6
Compression:
Stored size: 517 Bytes
Contents
#!/usr/bin/env ruby require "dbus" bus = DBus::SessionBus.instance # get a rb object proxy = bus.introspect("org.gnome.Rhythmbox", "/org/gnome/Rhythmbox/Player") proxyi = proxy["org.gnome.Rhythmbox.Player"] # register for signals mr = DBus::MatchRule.new mr.type = "signal" mr.interface = "org.gnome.Rhythmbox.Player" mr.path = "/org/gnome/Rhythmbox/Player" bus.add_match(mr) do |msg, first_param| print msg.member + " " puts first_param end proxyi.playPause(true) main = DBus::Main.new main << bus main.run
Version data entries
6 entries across 6 versions & 1 rubygems