Last active
July 6, 2020 23:34
-
-
Save Gavinok/2b2a0ae9be2ff44fd709be1601fd88a9 to your computer and use it in GitHub Desktop.
Collect urls from all surf windows in the current view.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WINDOWS=$(xprop -root | grep '^_NET_CLIENT_LIST(WINDOW).*' |sed -e 's/^.*# //' -e 's/, /\n/g') | |
echo "$WINDOWS" | while read window; do | |
if xprop -id $window | grep 'Surf' > /dev/null; then | |
xprop -id $window | grep '_SURF_URI(STRING) = ' | cut -d'"' -f 2 | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment