You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is currently done in the cli, but it would be good to have it in the common library to make it more usable for scripts that follow players coming and going. I think this is probably fairly essential to any use case for the library.
It should look something like this (but in C of course):
defon_player_name_appeared(name, data):
# start managing your player hereprint('player appeared: {}'.format(name))
defon_player_name_vanished(name, data):
# stop managing your player hereprintf('player name vanished: {}'.format(name))
user_data= {}
Playerctl.watch_player_names(on_player_appeared, on_player_vanished, user_data)
GLib.main_loop().run()
The text was updated successfully, but these errors were encountered:
This is currently done in the cli, but it would be good to have it in the common library to make it more usable for scripts that follow players coming and going. I think this is probably fairly essential to any use case for the library.
It should look something like this (but in C of course):
The text was updated successfully, but these errors were encountered: