#!/usr/bin/env ruby require 'matrix_qq' config = File.join(ENV['HOME'], '.config', 'matrix-qq', 'config.rb') unless File.size? config File.open config, 'w' do |f| f.puts %(module MatrixQQ Config = { tunnel: { # '#example:matrix.org' => { # type: 'matrix', # to: { '123456789' => 'group' } # }, # '123456789' => { # type: 'group', # to: { '#example:matrix.org' => 'matrix' } # }, # '10000' => { # type: 'friend', # to: { '!abcdef:matrix.org' => 'matrix' } # } } } end) end end load config session_bus = DBus::SessionBus.instance matrix = MatrixQQ::Matrix.new session_bus qq = MatrixQQ::QQ.new session_bus matrix.qq_dbus = qq.dbus qq.matrix_dbus = matrix.dbus main = DBus::Main.new main << session_bus main.run