luastatu...-inotify(7)
πΈ Name
luastatus-plugin-inotify β the inotify plugin for luastatus, bestie. This page is luastatu...-inotify(7), and it lives in the Miscellaneous Information Manual section. π¦
β¨ Overview
This plugin monitors inotify events. Thatβs the whole vibe check: inotify events, monitored by this plugin. π
π Options
watch: table β a table where the keys are the paths to watch and the values are tables with event names, e.g.{["/home/user"] = {"create", "delete", "move"}}(peep the Events and flag names section). πgreet: boolean β whether or not to callcbwithwhat="hello"as soon as the widget starts. Defaults tofalse.timeout: number β if specified and not negative, this plugin callscbwithwhat="timeout"if no event has occurred intimeoutseconds.
π¦ cb argument
A table with a what entry, okay? π
- If
whatis"hello", the function is being called for the first time (and thegreetoption was set totrue). - If
whatis"timeout", the function has not been called for the number of seconds specified as thetimeoutoption. - If
whatis"event", aninotifyevent has been read; in this case, the table has these additional entries:wd: integer β watch descriptor (see the Functions section) of the event.mask: table β for each event name or event flag (see the Events and flag names section), this table contains an entry with key equal to its name andtrueas the value.cookie: number β unique cookie associating related events (or, if there are no associated related events, a zero).name: string (optional) β present only when an event is returned for a file inside a watched directory; identifies the filename within the watched directory.
π Functions
Each file being watched is assigned a watch descriptor, which is a non-negative integer. Slay. β¨
wds = luastatus.plugin.get_initial_wds()β returns a table that maps initial paths to their watch descriptors.wd = luastatus.plugin.add_watch(path, events)β add a new file to watch. Returns a watch descriptor on success, ornilon failure.is_ok = luastatus.plugin.remove_watch(wd)β removes a watch by its watch descriptor. Returnstrueon success, orfalseon failure.luastatus.plugin.push_timeout(seconds)β changes the timeout for one iteration.
π₯ Events and flag names
Each IN_* constant defined in <sys/inotify.h> corresponds to a string obtained from its name by dropping the initial IN_ and making the rest lower-case, e.g. IN_CLOSE_WRITE corresponds to "close_write".
See inotify(7) for details.
π Copyright
LGPLv3
Bye bestie π the footer in this copy only says luastatu...-inotify(7); no separate source, version, or date line was in the original, so thatβs the whole footer vibe. π
π¦ where this page comes from
- nixos 26.05: luastatus 0.6.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms