выглядит как ответ user2974830 является использованием некорректный (возможно, старый) синтаксис для xdotool. --search
должно быть просто search
(без тире) и --windowid
должен быть --window
Это сказанное здесь более комплексное решение that I found here. Ссылка использует inotifywait, но я предпочитаю entr, который обертывает inotifywait.
echo "$(date --rfc-3339=seconds) Refresh: $FILE"
CUR_WID=$(xdotool getwindowfocus)
#gets the first $BROWSER window, if you have more than one
#$BROWSER window open, it might not refresh the right one,
#as an alternative you can search by the window/html title
WID=$(xdotool search --onlyvisible --class $BROWSER|head -1)
#TITLE="window/html file title"
#WID=$(xdotool search --title "$TITLE"|head -1)
xdotool windowactivate $WID
xdotool key 'ctrl+r'
xdotool windowactivate $CUR_WID
Я сохранил его в файле с именем reload-chrome-nix
и я бегу find . -type f | entr ./reload-chrome-nix
xdotool: непризнанная опция '--search' и ключ: непризнанная опция '--windowid' –
Я использовал apt-get для установки этого –
в порядке до сих пор это w orks: xdotool windowactivate «65011713» и этот ключ xdotool «F5», но я не могу отправить ключ к идентификатору окна спецификации. он продолжает говорить: unrecognized option '--windowid' –