def pomodoro_daemon(): pomodoro = get_pomodoro_proxy() pomodoro.StateChanged.connect(handle_state) GLib.MainLoop().run()