scripts/wofi/wofi-alt-tab.sh

23 lines
901 B
Bash
Raw Normal View History

#!/bin/bash
swaymsg -t get_tree |
jq -r '.nodes[].nodes[] | if .nodes then [recurse(.nodes[])] else [] end + .floating_nodes | .[] | select(.nodes==[]) | if .app_id then ((.app_id | tostring) + " -- " + .name) else .name end' |
2022-09-23 22:25:32 +00:00
grep -v __i3_scratch |
sed -e 's/^.*\-\- \(.*\)$/\1/' |
sed -e 's/^\(.*\) [—-] .*$/\1/'|
2022-07-21 03:34:39 +00:00
sed -e 's/^\([0-9]*\)\t*\(.*\)/\2 \1/' |
<<<<<<< HEAD
2022-11-04 15:02:59 +00:00
wofi -s $HOME/.dotfiles/wofi/style.css -c \
$HOME/.dotfiles/wofi/sidebar -d | {
read -r
id=`echo $REPLY | rev | cut -d' ' -f1 | rev`
swaymsg "[con_id=$id]" focus
}
echo $id $REPLY
=======
2022-09-22 17:48:43 +00:00
wofi -I -s /home/jpm/.dotfiles/wofi/style.css -c \
$HOME/.dotfiles/wofi/sidebar --show dmenu | {
read -r id name
swaymsg "[con_id=$id]" focus
}
>>>>>>> master