chore: cleanup

This commit is contained in:
2022-05-04 18:55:48 +02:00
parent 7acbafb7fe
commit 29eed372ff
36 changed files with 172 additions and 1138 deletions

View File

@ -0,0 +1,18 @@
#!/bin/sh
# ------Get available windows:
windows=$(swaymsg -t get_tree | jq -r '
recurse(.nodes[]?) |
recurse(.floating_nodes[]?) |
select(.type=="con"), select(.type=="floating_con") |
(.id | tostring) + " " + .app_id + ": " + .name')
# ------Limit wofi's height with the number of opened windows:
height=$(echo "$windows" | wc -l)
height=$(($height + 2))
# ------Select window with wofi:
selected=$(echo "$windows" | wofi -d --lines $height -i -p "Switch to:" | awk '{print $1}')
# ------Tell sway to focus said window:
swaymsg [con_id="$selected"] focus