SwayFloatingSwitcher icon indicating copy to clipboard operation
SwayFloatingSwitcher copied to clipboard

Support non-floating windows

Open savchenko opened this issue 4 years ago • 3 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
}

savchenko avatar Nov 15 '21 21:11 savchenko

Sounds feasible

ErikReider avatar Nov 15 '21 22:11 ErikReider

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

ErikReider avatar Dec 08 '21 19:12 ErikReider

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

ErikReider avatar Dec 08 '21 19:12 ErikReider