Skip to content

Conversation

@nabiko02
Copy link
Contributor

I have added the -L / --list-output flag to list available outputs for use with -o.
This allows users to programmatically get output names, useful for scripting and GUI tools like wf-recorder-gui.

@soreau
Copy link
Collaborator

soreau commented Jul 21, 2025

I would say that this is out of scope for wf-recorder. There are other tools to get this information, such as i.e. wayland-info -i xdg_output.

@nabiko02
Copy link
Contributor Author

I know I mainly did this for scripting, but I guess it's still useful for anyone using wf-recorder to be able to quickly see what outputs they can record without needing to know about other tools. It just keeps everything self-contained.

@soreau
Copy link
Collaborator

soreau commented Jul 21, 2025

If there is more than one output and do not pass -o, there is interactive selection for a user to see what outputs are available already.

@nabiko02 nabiko02 closed this Jul 21, 2025
@soreau
Copy link
Collaborator

soreau commented Jul 21, 2025

I don't want you to feel like you're wasting time, I'd rather see you solve your issue. I don't know how wf-recorder-gui works but maybe it could (optionally) install the required tools to use the program, such as wf-recorder and wayland-utils. Perhaps this could be a packaging dependency detail.

The other thing is that this project belongs to @ammen99, and has the final say on whether or not to include a feature such as this. So I am reopening this for @ammen99 comments.

@soreau soreau reopened this Jul 21, 2025
@ammen99
Copy link
Owner

ammen99 commented Jul 21, 2025

I am not totally opposed to adding this, however it would make sense to print the outputs in the same way that we do that for the interactive selection. And you'd also need to update the manpage and the --help text too.

I also get that you can get this information from another place but given that we already have code for printing a list of outputs, I don't see why we couldn't add a flag like this as well.

@nabiko02
Copy link
Contributor Author

I might have forgotten to add the update on the help command in my unstaged changes oopsi.
I did the manpage entry update and reuse the whole output format as the interactive one use.

src/main.cpp Outdated
-l, --log Generates a log on the current terminal. Debug purposes.
-L, --list-ouput List the available outputs.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
-L, --list-ouput List the available outputs.
-L, --list-output List the available outputs.

src/main.cpp Outdated
init_wayland_client();
load_output_info();

int i = 1;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would put this into a function to really reuse it, otherwise lgtm.

Copy link
Owner

@ammen99 ammen99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ammen99 ammen99 merged commit 664fc45 into ammen99:master Jul 21, 2025
layercak3 added a commit to layercak3/wf-recorder-ghfork that referenced this pull request Aug 3, 2025
Fixes: 664fc45 ("feat: add output listing capability (ammen99#317)")
ammen99 pushed a commit that referenced this pull request Sep 9, 2025
Fixes: 664fc45 ("feat: add output listing capability (#317)")
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.

3 participants