Don't crash when processes change too fast
Add systemd service and Makefile install target
Add one-shot mode
watch_tabnine is a lightweight daemon that ensures that TabNine doesn't eat all your memory by checking its memory consumption at regular intervals and killing it when it becomes too big.
watch_tabnine is written in the D programming language. No particular reason, it's just that I'm learning it, and needed this tool anyway. By design, it only runs on Linux.
At the moment there is no pre-built binary: you need to compile this yourself.
Install a D compiler (tested with DMD and LDC2)
Clone this repository:
git clone https://git.sr.ht/~schnouki/watch_tabnine
Build it:
make # If using DMD
make DC=ldc2 # If using LDC2
Run it:
./watch_tabnine
Optional: install it
sudo make install PREFIX=/usr/local
Optional: after installing it, run it through systemd:
sudo sytemctl daemon-reload
sudo systemctl enable --now watch_tabnine
watch_tabnine supports several command line options:
-n
, --name
: name of the TabNine executable (default: TabNine
)-m
, --mem
: max allowed memory in MB (default: 250 MB)-s
, --swap
: max allowed swap in MB (default: 100 MB)-w
, --wait
: delay between each check in seconds (default: 30s)-1
, --once
: only run onceThis program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
git checkout -b feature/foo_bar
or git checkout -b bugfix/fix_foo_bar
)git send-email
at schnouki %at% schnouki.net
Questions, feedback? You can either email me (schnouki %at% schnouki.net%
) or
ping me on Twitter (@Schnouki).