fswatch icon indicating copy to clipboard operation
fswatch copied to clipboard

What are my monitor properties? + more undocumented

Open doronbehar opened this issue 4 years ago • 2 comments

Hey :) This program looks awesome, first time user here.

On GNU/Linux, I'd like to use fswatch to monitor only writes to a file. I'd like to run a markup convertor whenever I perform a write to a README file.

It feels as if the normal fswatch -o README shows also events which are not write because it spits a new line even if I don't write the file but moving my focus to it.

I notice there's --monitor-property name=value but I couldn't find documentation / examples for these properties. fswatch --list-monitors doesn't show any more information. Also, there's --format=FORMAT which perhaps could have been useful to filter out non-write events but I couldn't find documentation for that either :/ I'm not fluent in C enough to look it up my self...

Regards.

doronbehar avatar Apr 29 '20 07:04 doronbehar

Do you mean EVENT TYPES with the fswatch --event name argument? Probably the "Updated" type is what you want. However, I've noticed some processes do a Remove Create cycle on macos.

The actual type names are not listed in the man pages, but are mentioned in this issue/bug: #207

steamfire avatar Jul 06 '20 19:07 steamfire

I'm also missing documentation for --format. So far I've found %f (modification type), %p (full path), %n (not sure, perhaps count?), %t (time). Wish there was something for getting the path relative to the current directory.

solarkraft avatar Dec 26 '22 16:12 solarkraft