new version of window_list.sh. Hopefully it works better than the previous version. It now uses window ID instead of title to set the focus.
This commit is contained in:
parent
db9c7732c4
commit
3d3fa8de95
@ -1,10 +1,16 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
select_window() {
|
mapfile -t windowList < <(python3 -c '
|
||||||
local window="$(yad --list --column "Select Window" "$@")"
|
import i3ipc
|
||||||
echo "${window%|}"
|
|
||||||
}
|
|
||||||
|
|
||||||
i3-msg '[title="'$(i3-msg -t get_tree | jq -r "recurse(.nodes[]) | select(.window) | .name" | select_window)'"] focus'
|
i3 = i3ipc.Connection()
|
||||||
|
|
||||||
|
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
|
exit 0
|
||||||
|
fi
|
||||||
|
i3-msg \[id="${id}"\] focus
|
||||||
|
Loading…
Reference in New Issue
Block a user