Overview
This page will describe themonitor tool of settingsctl. The
monitor command will monitor a setting for changes made via settingsctl. Examples
For
settingsctl monitor hello:
hello.world.example → Hello World
hello.foo.bar → Example
For
settingsctl monitor hello --json:
{"setting": "hello.world.example", "value": "Hello World", "value-raw": ["Hello", "World"]}
{"setting": "hello.foo.bar", "value": "Example", "value-raw": ["Example"]}
It is one-entry-per-line to make it easy to parse (as multiple JSON entries may be outputted).
Technical Explanation (How It Works)
For each time a setting is set, JSON data is dumped into a SETTINGSCTL_IPC file
in the runtime/tmp directory (as per XDG standards).
The monitor sessions, which watch this file for changes, are alerted of a settings being set, and print out the data.
