Answer the question
In order to leave comments, you need to log in
Turn off FireFox and update Chrome?
Good afternoon, please tell me (on Linux the first day) what needs to be written in the working .sh
file so that after going to the page in FireFox with Title, "Yandex.Money - Mozilla Firefox"
the browser closes after 5 seconds, and one active contribution is updated in Chrome (preferably also by Title).
PS Mozil already has a cycle that checks the tabs, I define the Yandex money tab, but I don’t know how to do it further (turn off the browser after 5s and refresh the tab in chrome)
PS2 seems to be somehow possible using this commandsend_key_to_window
Answer the question
In order to leave comments, you need to log in
can be more universally approached, since
- wayland windows cannot be read by X utilities
- the localization of titles can change, for example, for the Russian-speaking segment it will no longer be "Yandex.Money - Mozilla Firefox" but "Yandex.Money - Mozilla Firefox" it is
better to read not the title of the window, but directly the current state of the browser
for this, install the utilities jq and lz4jsoncat
PatchFirefox="$HOME/.mozilla/firefox"
PROFILE=$(cat $PatchFirefox/profiles.ini | awk -F= '$1 == "Default" {print $2}' | head -n 1)
PatchJson="$PatchFirefox/$PROFILE/sessionstore-backups/recovery.jsonlz4"
URL=$(lz4jsoncat "$PatchJson" | jq -r '.windows[].tabs[.windows[].selected -1].entries[.windows[].tabs[.windows[].selected -1].index -1].url')
if ; then
sleep 5
killall firefox
#код для работы с Chrome
fi
It is best to do it with a plugin for the browser (i.e. for firefox and chrome), and it is not necessary to write the plugin itself, you can use the ready-made greasemonkey / tempermonkey to write simple scripts that will communicate through a third-party service (you will need it, you need to somehow send messages between browsers), simple as boots (received - sent).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question