Open RyIot3329 opened 4 months ago
Trying to get xdotool to work with air. I have this in my cmd .air.toml file
go build -o ./tmp/main && ./reload.sh
This is my reload.sh file:
set -o errexit set -o nounset
keystroke="CTRL+F5"
BROWSER="${1:-firefox}"
browser_windows="$(xdotool search --sync --all --onlyvisible --name ${BROWSER})"
for bw in $browser_windows; do xdotool key --window "$bw" "$keystroke" done
It does reload the browser but it is always unable to connect. Any ideas on how to fix this?
the command you are looking for is in #557 . but still trying to figure out how to implement it correctly with air.
EDIT: see my last command. that works for me.
Trying to get xdotool to work with air. I have this in my cmd .air.toml file
go build -o ./tmp/main && ./reload.sh
This is my reload.sh file:
!/bin/bash
set -o errexit set -o nounset
keystroke="CTRL+F5"
set to whatever's given as argument, defaults to firefox
BROWSER="${1:-firefox}"
find all visible browser windows
browser_windows="$(xdotool search --sync --all --onlyvisible --name ${BROWSER})"
Send keystroke
for bw in $browser_windows; do xdotool key --window "$bw" "$keystroke" done
It does reload the browser but it is always unable to connect. Any ideas on how to fix this?