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