Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
PipeWire Screencast Info
#!/bin/sh
pw-dump | jq -r '[.[] | select(.info.props."node.name" | IN("firefox","gnome-shell","kwin_wayland","obs","xdg-desktop-portal-wlr","xdp-screencast.py")) | .id] as $pw_node_ids | [ .[] | select(.info.props."node.id" | IN($pw_node_ids[])) | .id ] as $pw_port_ids | .[] | select(.id | IN(($pw_node_ids + $pw_port_ids)[]))'
@kkartaltepe
Copy link

kkartaltepe commented Apr 9, 2022

https://gist.github.com/kkartaltepe/c0ae86821e2ca3c5afb5bc968df695b2 here is the output for an attempted capture on nvidia on gnome 42, it looks like its missing the gnome port though. I think the port ended up as gnome-shell updated the gist.

@columbarius
Copy link
Author

thanks!

@columbarius
Copy link
Author

Sigh... just found out that jq doesn't have support for 64bit long integers so all modifiers returned from this script are wrong. Please just read search in the output of pw-dump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment