track_workspace[s] now uses track_anything.sh
This commit is contained in:
parent
35cbcaadbc
commit
2b24b0fb67
|
@ -1,7 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
swaymsg -t subscribe -m '[ "workspace" ]' | jq --unbuffered '.current.num' | while read -r;do
|
||||
if [ "$REPLY" != "null" ];then
|
||||
echo "$REPLY"
|
||||
fi
|
||||
done
|
||||
. "$(dirname "$0")/track_anything.sh"
|
||||
|
||||
poll() {
|
||||
swaymsg -t get_workspaces | jq -r '.[]|select(.focused).name'
|
||||
}
|
||||
|
||||
rate_limit .1
|
||||
poll_interval 10
|
||||
on_sway
|
||||
output_string .
|
||||
filter uniq
|
||||
|
||||
start "$@"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
. "$(dirname "$0")/track_anything.sh"
|
||||
|
||||
poll() {
|
||||
swaymsg -t get_tree |
|
||||
jq -c --unbuffered '.
|
||||
|
@ -52,12 +54,11 @@ poll() {
|
|||
| $out
|
||||
'
|
||||
}
|
||||
poll
|
||||
[ ${1-x} == '-d' ] && exit 0
|
||||
|
||||
swaymsg -t subscribe -m '[ "workspace", "window" ]' |
|
||||
jq --unbuffered -c '.' |
|
||||
while read -r EVENT;do
|
||||
poll
|
||||
done
|
||||
rate_limit .1
|
||||
poll_interval 10
|
||||
on_sway
|
||||
output_string .
|
||||
filter uniq
|
||||
|
||||
start "$@"
|
||||
|
|
Loading…
Reference in New Issue
Block a user