ErikReider / SwayFloatingSwitcher

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support non-floating windows

savchenko opened this issue · comments

Would it be possible to support non-floating windows as well?

Via swaymsg:

# Yeah, I know...
swaymsg -t get_tree | jq -r '.nodes[].nodes[] | {"w": .name} + (if .nodes then [recurse(.nodes[])] else [] end + .floating_nodes | .[] | select(.nodes==[])) | ((.id | tostring) + "\t " + (.w | gsub("^[^:]*:|<[^>]*>"; "") | sub("__i3_scratch"; "[S]")) + "\t " +  .name)' | sort -V -k1 -t " " | head -n -1 | wofi --sort-order=alphabetical --width=800 --show dmenu --prompt=">_" | {
  read -r id name
  swaymsg "[con_id=$id]" focus
}

Sounds feasible

Hmm. I'm not sure if I'm able to get which workspace is focused through get_tree

The visible key is interesting but it's set to true for all applications on all visible workspaces (multiple monitors)