Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wolf UI #179

Draft
wants to merge 6 commits into
base: stable
Choose a base branch
from
Draft

Wolf UI #179

wants to merge 6 commits into from

Conversation

ABeltramo
Copy link
Member

Plugging together https://github.com/games-on-whales/wolf-ui with Wolf.
WIP will update the PR once more things are ready

@ABeltramo ABeltramo linked an issue Mar 2, 2025 that may be closed by this pull request
@ABeltramo ABeltramo changed the title Adding Wolf UI Wolf UI Mar 2, 2025
@ABeltramo
Copy link
Member Author

ABeltramo commented Mar 6, 2025

Introducing profiles

After a lot of discussion in the dev channels, I've added a new concept in Wolf: profiles. This will be particularly useful for wolf-ui which will be the new entrypoint when starting a Moonlight streaming session and will allow to:

  • easily pick up a profile and start an app (this will allow you to carry over savegames and state between different Moonlight clients)
  • easily join another streaming session for co-op playing.

The format in config.toml is the following

[[profiles]]
id = 'moonlight-profile-id'

    [[profiles.apps]]
    title = 'Wolf UI'

        [profiles.apps.runner]
        run_cmd = '/home/ale/repos/wolf-ui/src/wolf-ui'
        type = 'process'

    [[profiles.apps]]
    start_audio_server = false
    start_virtual_compositor = false
    title = 'Test ball'

        [profiles.apps.audio]
        source = 'audiotestsrc wave=ticks is-live=true'

        [profiles.apps.runner]
        run_cmd = "sh -c \"while :; do echo 'running...'; sleep 10; done\""
        type = 'process'

        [profiles.apps.video]
        source = '''videotestsrc pattern=ball flip=true is-live=true !
                           video/x-raw, framerate={fps}/1''' 

[[profiles]]
id = 'user'
name = 'User'
apps = []

We'll automatically migrate from the current config.toml by:

  • Adding the hardcoded moonlight-profile-id which will represent the apps that are going to be shown in the Moonlight UI
  • Adding a default user profile and copying over all the previously defined apps in here.

APIs

The currently available /api/v1/apps will now control the apps that will be shown in the Moonlight UI. There are 3 new endpoints to control profiles:

  • GET /api/v1/profiles returns a list of all defined profiles (most notably it wouldn't return the special "moonlight" profile, you'll have to use /api/v1/apps to interact with that one)
  • POST /api/v1/profiles/add takes a full profile object
  • POST /api/v1/profiles/remove takes just an id: the ID of the profile to be deleted

Hitting any of the apps or profiles endpoints will also automatically save the changes into the config.toml (if any).

I've yet to define how to associate streaming sessions with profiles and how that will play with CO-OP sessions, I'll start working on that now.

@Skerga, @salty2011 please let me know what you guys think and what else you would like to see added!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A UI for Wolf
1 participant