Send notification once long running command is finished. Add duration PROMP_FIELD.
Project description
Overview
Send notification once long-running command is finished. Adds `long_cmd_duration` to `$PROMPT_FIELDS` .
Installation
To install use pip:
xpip install xontrib-cmd-durations
# or: xpip install -U git+https://github.com/jnoortheen/xontrib-cmd-durations
Usage
xontrib load cmd_done
Usage
- makes
long_cmd_duration
available to the$PROMPT_FIELDS
- if the command is taking more than
$LONG_DURATION
seconds- it is
long_cmd_duration
returns the duration in human readable way - a desktop notification is sent if the terminal is not focused.
-
Note: Currently the focusing part requires
xdotool
to be installed.So the notification part will not work in Windows/OSX. PRs welcome on that.
-
- it is
$RIGHT_PROMPT = '{long_cmd_duration:⌛{}}{user:{{BOLD_RED}}🤖{}}{hostname:{{BOLD_#FA8072}}🖥{}}'
Credits
This package was created with xontrib cookiecutter template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for xontrib-cmd-durations-0.2.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4bfe8a95c25f3339856b42f785594ed735260730eee30fad0a80958c62018ef |
|
MD5 | 03033b77b9268584ba523757a469d9c0 |
|
BLAKE2b-256 | b51deb96f5139ddec8a13b3f8eaa30bdfe20bea7abc223673154ae7a50c48cbc |
Close
Hashes for xontrib_cmd_durations-0.2.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3acb23ff7f2c335141525d30bf8f1e431deb809795aa7cf9fbffffd6766cdf12 |
|
MD5 | 4164f21fe7d5778cfd2d665668ecb0ba |
|
BLAKE2b-256 | 0356ad092a45902efde5447742a490df6f7d5cb059e5340c735de62e3de8e040 |