Run a command every time a file is opened
Find a file
2020-10-11 17:30:45 +02:00
libcatch@db86a25c19 Cleanup and submodule update 2020-10-11 16:44:29 +02:00
.gitignore Cleanup and submodule update 2020-10-11 16:44:29 +02:00
.gitmodules Initial commit 2020-10-11 12:11:56 +02:00
inotifyrun.c Licensed under GPLv3 2020-10-11 17:30:45 +02:00
license.h Licensed under GPLv3 2020-10-11 17:30:45 +02:00
LICENSE.txt Licensed under GPLv3 2020-10-11 17:30:45 +02:00
README.md Added readme 2020-10-11 10:18:39 +00:00
test.sh Initial commit 2020-10-11 12:11:56 +02:00

inotifyrun

Run a command every time a file is opened

Setup

  1. Clone: git clone https://gitlab.com/niansa/inotifyrun.git --recursive && cd inotifyrun
  2. Compile: clang -rdynamic inotifyrun.c libcatch/libcatch.c -o inotifyrun
  3. Install: sudo cp inotifyrun /usr/local/bin/

Usage

This should be self-explanatory:

inotifyrun ./test.sh "echo hi" ~/Documents/table.odt "killall libreoffice"