How to fix inotify_watch_limit

touch ~/98-watches.conf
echo '# add this files to /etc/sysctl.d/' >> ~/98-watches.conf
# yes, allowing 524288 files to be open is a lot
echo 'fs.inotify.max_user_watches = 524288' >> ~/98-watches.conf
sudo mv ~/98-watches.conf /etc/sysctl.d
sudo sysctl -p --system