summaryrefslogtreecommitdiff
path: root/bin/guiscripts/osurftabs
blob: d41424bae22f3d98831e22bf2fdf8c1fa6b8c2af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

# list surf tabbed windows 

# dependencies: lsw, dmenu, xprop
# expects the tabbed windows to be named 'tabbed-surf'
lsw | cut -f1 -d' ' |
	while read -r winid 
	do 
		[ "tabbed-surf" = "$(xprop -id "$winid" WM_CLASS | cut -f2 -d'"')" ] &&
			 printf '%s %s\n' "$winid"  "$(xprop -id "$winid" WM_NAME | cut -f2 -d'"')"
	done