LinuxCommandLibrary

noti

Send desktop notifications from the command line

TLDR

Display a notification when tar finishes compressing files

$ noti [tar -cjf example.tar.bz2 example/]
copy

Display a notification even when you put it after the command to watch
$ [command_to_watch]; noti
copy

Monitor a process by PID and trigger a notification when the PID disappears
$ noti [[-w|--pwatch]] [process_id]
copy

SYNOPSIS

noti [command]

PARAMETERS

--config <path>
    Specifies the path to the configuration file.

--title <title>
    Sets the title of the notification.

--message <message>
    Sets the message content of the notification.

--sound
    Enables sound notification (if supported by the system).

--wait
    Waits for notification to be dismissed by user

--no-title
    Suppresses the title in the notification.

--no-message
    Suppresses the message in the notification.

--timeout <seconds>
    Sets the notification timeout in seconds.

--version
    Displays the version number.

--help
    Displays the help message.

DESCRIPTION

noti is a command-line notification tool that displays desktop notifications when a long-running command completes. It is designed to be simple, unobtrusive, and easy to use across different platforms (Linux, macOS, Windows). Instead of constantly monitoring a terminal window, users can receive a visual or auditory cue when a task finishes. This is particularly useful for tasks like compiling code, running tests, or transferring large files. Noti supports various notification methods depending on the operating system, ensuring notifications are delivered effectively. The tool can be integrated into existing workflows by simply prefixing the command with `noti`. The basic usage is `noti command`, and it uses the operating system’s native notification capabilities. Noti tries to auto configure but also allows for advanced configurations. With a simple config file, users can tweak a variety of parameters to customize the notifications. It's a handy tool for increasing productivity and reducing the need to constantly check on the progress of time-consuming processes.

CAVEATS

noti relies on the system's notification mechanism. Ensure that your system has a notification server running (e.g., notify-osd on Linux). The availability of certain features, such as sound notifications, might vary depending on the operating system and installed packages.

CONFIGURATION FILE

The configuration file allows fine-grained control over notification settings. It can be used to customize the appearance and behavior of notifications globally. You can set title, message, and other parameters.

EXIT CODES

noti will pass the exit code of the executed command. So if command succeeded with exit code 0 then noti also will exit with 0. In case of error noti will exit with a non-zero exit code.

HISTORY

noti is a relatively modern tool, actively developed to provide cross-platform notification support. It addresses the need for a consistent way to receive notifications from the command line, regardless of the underlying operating system. It's designed to be lightweight and easy to integrate into existing workflows.

SEE ALSO

notify-send(1), wall(1)

Copied to clipboard