Crates.io | nu_plugin_desktop_notifications |
lib.rs | nu_plugin_desktop_notifications |
version | 1.2.3 |
source | src |
created_at | 2023-11-08 11:18:34.197511 |
updated_at | 2024-08-26 12:18:06.501344 |
description | A nushell plugin to send desktop notifications |
homepage | https://github.com/FMotalleb/nu_plugin_desktop_notifications |
repository | https://github.com/FMotalleb/nu_plugin_desktop_notifications |
max_upload_size | |
id | 1028970 |
size | 81,979 |
A nushell plugin to send notification to desktop using notify-rust
Flags:
-h, --help - Display the help message for this command
-s, --summary <String> - summary of the notification
-t, --body <String> - body of the notification
--subtitle <String> - subtitle of the notification [macOS and windows only]
-a, --app-name <String> - app name of the notification
-i, --icon <Filepath> - path to icon of the notification
--timeout <Duration> - duration of the notification [macOS and XDG Desktops only] (defaults to system default)
--crash-on-error <Filepath> - returns notification error if encountered
~> notify -t "test notification body" --summary "test title"
def "notify on done" [
task: closure
] {
let start = date now
let result = do $task
let end = date now
let total = $end - $start | format duration sec
let body = $"given task finished in ($total)"
notify -s "task is done" -t $body
return $result
}
notify on done { port scan 8.8.8.8 53 }
git clone https://github.com/FMotalleb/nu_plugin_desktop_notifications.git
nupm install --path nu_plugin_desktop_notifications -f
git clone https://github.com/FMotalleb/nu_plugin_desktop_notifications.git
cd nu_plugin_desktop_notifications
cargo build -r
register target/release/nu_plugin_desktop_notifications
cargo install nu_plugin_desktop_notifications
register ~/.cargo/bin/nu_plugin_desktop_notifications