Screenshare: auto-pick gamescope windows
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
08b25d3241
commit
3f4ee2579b
1 changed files with 6 additions and 5 deletions
|
|
@ -118,10 +118,10 @@ in
|
|||
# picker skips the dialog when a game is open: XDPH hands it the window
|
||||
# list as id[HC>]class[HT>]title[HE>]address[HA>]… and reads back
|
||||
# "[SELECTION]<flags>/window:<id>" (flag r = token allowed). Hearthstone
|
||||
# wins, else any other Proton window (steam_app_*) that isn't a launcher
|
||||
# or HDT. Gaming's patched Vesktop writes the time to xdph-pick-manually
|
||||
# right before asking the portal ("Pick Another Window", shift-click)
|
||||
# to get the normal picker instead.
|
||||
# wins, then a nested gamescope window, then any other Proton window
|
||||
# (steam_app_*) that isn't a launcher or HDT. Gaming's patched Vesktop
|
||||
# writes the time to xdph-pick-manually right before asking the portal
|
||||
# ("Pick Another Window", shift-click) to get the normal picker instead.
|
||||
#
|
||||
# After answering, it grim-shots the selection to xdph-preview.jpg for
|
||||
# Vesktop's dialog (~70ms vs Electron's ~1s PipeWire thumbnail). grim
|
||||
|
|
@ -154,9 +154,10 @@ in
|
|||
}
|
||||
game=$(entries "" '
|
||||
$2 ~ /^steam_app_/ && $3 == "Hearthstone" { hs = $1 }
|
||||
$2 == "gamescope" && !gs { gs = $1 }
|
||||
$2 ~ /^steam_app_/ && $3 != "" && !other \
|
||||
&& $3 !~ /^(Battle\.net|Hearthstone Deck Tracker|HearthstoneOverlay)/ { other = $1 }
|
||||
END { print hs != "" ? hs : other }')
|
||||
END { print hs != "" ? hs : gs != "" ? gs : other }')
|
||||
|
||||
if [ -n "$game" ] && (( now - forced > 10 )); then
|
||||
selection=r/window:$game
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue