blob: 1862db9a77ac489c0762c7984f5cd7b22558c294 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#autoload
local list expl
_wanted windows || return 1
list=( "${(@)${(M@)${(@f)$(_call windows xwininfo -root -tree)}:#[ ]#0x[0-9a-f]# \"*}##[ ]#}" )
if [[ "$1" = -n ]]; then
shift
_all_labels windows expl 'window name' \
compadd "$@" -d list - "${(@)${(@)list#*\"}%%\"*}"
else
[[ "$1" = - ]] && shift
_all_labels windows expl 'window ID' compadd "$@" -d list - "${(@)list%% *}"
fi
|