Sha256: 9097405ec4e8fdbdb9d2c7c2af7033d6ab4aec73f875490ab4f9ba4f978c8fb2
Contents?: true
Size: 795 Bytes
Versions: 17
Compression:
Stored size: 795 Bytes
Contents
#!/usr/bin/env ruby # frozen_string_literal: true require "dbus" session_bus = DBus::SessionBus.instance # Get the Rhythmbox service rhythmbox = session_bus.service("org.gnome.Rhythmbox") # Get the object from this service player = rhythmbox.object("/org/gnome/Rhythmbox/Player") if player.has_iface? "org.gnome.Rhythmbox.Player" puts "We have Rhythmbox Player interface" end player_with_iface = player["org.gnome.Rhythmbox.Player"] p player_with_iface.getPlayingUri # Maybe support default_iface=(iface_str) on an ProxyObject, so # that this is possible? player.default_iface = "org.gnome.Rhythmbox.Player" puts "default_iface test:" p player.getPlayingUri player.on_signal("elapsedChanged") do |u| puts "elapsedChanged: #{u}" end main = DBus::Main.new main << session_bus main.run
Version data entries
17 entries across 17 versions & 1 rubygems