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.4.tar.gz
(645.5 kB
view details)
Built Distribution
File details
Details for the file xontrib-cmd-durations-0.2.4.tar.gz
.
File metadata
- Download URL: xontrib-cmd-durations-0.2.4.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 | 9c5fdfd6b151ea64515e9c918a6e775aea36d165858039b8f59e586d454d0b66 |
|
MD5 | 091e09a1d4234df0a75a8400b5afb144 |
|
BLAKE2b-256 | be5282b3ea4b70e140a3de58f51f4c8b5d6de1690233d1f2d82bb318de903057 |
File details
Details for the file xontrib_cmd_durations-0.2.4-py3-none-any.whl
.
File metadata
- Download URL: xontrib_cmd_durations-0.2.4-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 | 2b6f7f4fbae198dc657b8fcc46c064d317003cd1cb6b1ab79a3b450eb565a0f6 |
|
MD5 | 736643932a12e198d2b6fe2f09c5d17e |
|
BLAKE2b-256 | 8ca804bef18349add177d01b31bd3a0a1df29495af7ea228b9bedac210e98197 |