Send notification once long running command is finished. Add duration PROMP_FIELD.
Project description
Send notification once long running command is finished. Add duration PROMP_FIELD.
If you like the idea click ⭐ on the repo and stay tuned.
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$PROMP_FIELD
- 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.2.tar.gz
(645.5 kB
view details)
Built Distribution
File details
Details for the file xontrib-cmd-durations-0.2.2.tar.gz
.
File metadata
- Download URL: xontrib-cmd-durations-0.2.2.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 | 2aa7c0d170654f1a8ec3806e3058a561731f8d257aa18f3b55ae9e0d180ffa9e |
|
MD5 | 6ab0f5014b29f30d7c333df62ffc08b2 |
|
BLAKE2b-256 | 080965bee8503cddaa75f4f7685757ffe17a50a44b5188b7e0d2f0f3b8f95b36 |
File details
Details for the file xontrib_cmd_durations-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: xontrib_cmd_durations-0.2.2-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 | b66ce1d1402af7abff26771a1db75d1d93a6fa80790c46caf83396302c05f782 |
|
MD5 | f9bcae62f62483b60f98e621296730af |
|
BLAKE2b-256 | c157aeff343d279ec2b9cc6713620157e0a58ffbf0d8f9f3d0781a3ee00407b0 |