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
File details
Details for the file xontrib-cmd-durations-0.2.6.tar.gz
.
File metadata
- Download URL: xontrib-cmd-durations-0.2.6.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.5 Linux/5.12.2-1-MANJARO
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21f381ec52ed035670d1d923c2809e23684c1961ee8ce25af43ece786e93c06f |
|
MD5 | a54538efcdbf59cd124c91e05f9d48ff |
|
BLAKE2b-256 | cc91787378b7217b27998e76a417ac4c0c8cf8b612fc4f5917180337c0e7b43a |
File details
Details for the file xontrib_cmd_durations-0.2.6-py3-none-any.whl
.
File metadata
- Download URL: xontrib_cmd_durations-0.2.6-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.5 Linux/5.12.2-1-MANJARO
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35cfb325f9f71efd12eb6ad08f543dc27663f5f5ecaac0d43d18aebe160f9758 |
|
MD5 | 11d198a42bd8e9964512b55cb7290a2d |
|
BLAKE2b-256 | c108e2a76600ca58c1e7f420290a11e0952eaef44ee87f6ccc9ac077fe548a98 |