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
|
||||
|
||||
select_window() {
|
||||
local window="$(yad --list --column "Select Window" "$@")"
|
||||
echo "${window%|}"
|
||||
}
|
||||
mapfile -t windowList < <(python3 -c '
|
||||
import i3ipc
|
||||
|
||||
i3-msg '[title="'$(i3-msg -t get_tree | jq -r "recurse(.nodes[]) | select(.window) | .name" | select_window)'"] focus'
|
||||
i3 = i3ipc.Connection()
|
||||
|
||||
exit 0
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user