2022-11-25 02:35:58 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2022-11-30 03:35:35 -05:00
|
|
|
mapfile -t windowList < <(python3 -c '
|
|
|
|
import i3ipc
|
2022-11-25 02:35:58 -05:00
|
|
|
|
2022-11-30 03:35:35 -05:00
|
|
|
i3 = i3ipc.Connection()
|
2022-11-25 02:35:58 -05:00
|
|
|
|
2022-11-30 03:35:35 -05:00
|
|
|
for con in i3.get_tree():
|
|
|
|
if con.window and con.parent.type != "dockarea":
|
|
|
|
print(con.window)
|
|
|
|
print(con.name)')
|
|
|
|
id="$(yad --title "I38" --list --separator "" --column "id" --column "Select Window" --hide-column 1 --print-column 1 "${windowList[@]}")"
|
|
|
|
if [[ -z "${id}" ]]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
i3-msg \[id="${id}"\] focus
|