diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-17 12:49:16 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-17 12:49:16 +1000 |
| commit | 2c94c42cbd269b9b7fae3ad4d33e31e493e739b4 (patch) | |
| tree | 3593981fecd1847bd0bfe423a0f7942483ba9055 /src/caelestia/utils/notify.py | |
| parent | completions: update for prev commit (diff) | |
| download | caelestia-cli-2c94c42cbd269b9b7fae3ad4d33e31e493e739b4.tar.gz caelestia-cli-2c94c42cbd269b9b7fae3ad4d33e31e493e739b4.tar.bz2 caelestia-cli-2c94c42cbd269b9b7fae3ad4d33e31e493e739b4.zip | |
scheme: add notify opt
For sending a notification on error
Diffstat (limited to 'src/caelestia/utils/notify.py')
| -rw-r--r-- | src/caelestia/utils/notify.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/caelestia/utils/notify.py b/src/caelestia/utils/notify.py new file mode 100644 index 0000000..ad1ef33 --- /dev/null +++ b/src/caelestia/utils/notify.py @@ -0,0 +1,5 @@ +import subprocess + + +def notify(*args: list[str]) -> str: + return subprocess.check_output(["notify-send", "-a", "caelestia-cli", *args], text=True).strip() |