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
xontrib-cmd-durations-0.2.3.tar.gz
(645.5 kB
view details)
Built Distribution
File details
Details for the file xontrib-cmd-durations-0.2.3.tar.gz
.
File metadata
- Download URL: xontrib-cmd-durations-0.2.3.tar.gz
- Upload date:
- Size: 645.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.5 Linux/5.9.1-1-MANJARO
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 492e4971b9e679c457bf8be7db4e020bf546b246952470accda8e966104cd6f9 |
|
MD5 | 2d2f95e82cb0ccddc7194b3cdc82d690 |
|
BLAKE2b-256 | e95260e2ba03fbd1445aef5be1618d3db60d412c63adf6b270d860c9ca9d6fe4 |
File details
Details for the file xontrib_cmd_durations-0.2.3-py3-none-any.whl
.
File metadata
- Download URL: xontrib_cmd_durations-0.2.3-py3-none-any.whl
- Upload date:
- Size: 647.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.5 Linux/5.9.1-1-MANJARO
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a08ec1b23d43c3bd420c2761a611904af2a08a24fffb6ccbc37be1961a53ee3 |
|
MD5 | afb8172ea774a56edc0f6d9c3b35623a |
|
BLAKE2b-256 | 869d60ac2f15010c13045a461efa6b418dc6cd81e60d102dba0884e7b3585ef4 |