{"id":13740632,"url":"https://github.com/rickstaa/tmux-notify","last_synced_at":"2025-04-04T10:09:07.426Z","repository":{"id":18913147,"uuid":"85560495","full_name":"rickstaa/tmux-notify","owner":"rickstaa","description":"Tmux plugin to notify you when processes are finished.","archived":false,"fork":false,"pushed_at":"2025-01-26T09:30:41.000Z","size":134,"stargazers_count":177,"open_issues_count":1,"forks_count":13,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-28T09:09:07.983Z","etag":null,"topics":["notifications","notify-send","server-management","telegram","tmux","tmux-plugin","tmux-plugins"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rickstaa.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-20T09:53:21.000Z","updated_at":"2025-03-25T17:05:41.000Z","dependencies_parsed_at":"2024-10-27T11:10:25.061Z","dependency_job_id":"4496faf8-d979-40bd-a728-927e398e3cd1","html_url":"https://github.com/rickstaa/tmux-notify","commit_stats":null,"previous_names":["rickstaa/tmux-notify"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickstaa%2Ftmux-notify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickstaa%2Ftmux-notify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickstaa%2Ftmux-notify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickstaa%2Ftmux-notify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rickstaa","download_url":"https://codeload.github.com/rickstaa/tmux-notify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247157283,"owners_count":20893220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["notifications","notify-send","server-management","telegram","tmux","tmux-plugin","tmux-plugins"],"created_at":"2024-08-03T04:00:50.740Z","updated_at":"2025-04-04T10:09:07.397Z","avatar_url":"https://github.com/rickstaa.png","language":"Shell","funding_links":[],"categories":["Shell","Plugins"],"sub_categories":[],"readme":"# tmux-notify \u003c!-- omit in toc --\u003e\n\n[![Maintained](https://img.shields.io/badge/Maintained%3F-yes-green)](https://github.com/rickstaa/tmux-notify/pulse)\n[![Contributions](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](CONTRIBUTING.md)\n[![Tmux version](https://img.shields.io/badge/tmux-%3D%3E1.9-blue)](https://github.com/tmux/tmux/wiki)\n\n\u003ca href=\"https://github.com/rickstaa/tmux-notify\"\u003e\u003cimg src=\"resources/tmux-notify-logo.svg\" alt=\"tmux notify logo\" width=\"567\" height=\"135\"/\u003e\u003c/a\u003e\n\nTmux plugin to notify you when processes are finished.\n\n\u003e \\[!NOTE]\\\n\u003e Notifications are sent via [libnotify](https://gitlab.gnome.org/GNOME/libnotify), and visual bells are raised in the Tmux window. Visual bells can be mapped (in the terminal level) to the X11 urgency bit and handled by your window manager.\n\n## Table of Contents \u003c!-- omit in toc --\u003e\n\n*   [Use cases](#use-cases)\n*   [Pre-requisites](#pre-requisites)\n*   [Install](#install)\n*   [Usage](#usage)\n*   [Configuration](#configuration)\n    *   [Enable verbose notification](#enable-verbose-notification)\n    *   [Change monitor update period](#change-monitor-update-period)\n    *   [Add additional shell suffixes](#add-additional-shell-suffixes)\n    *   [Enable telegram channel notifications](#enable-telegram-channel-notifications)\n    *   [Enable Pushover notifications](#enable-pushover-notifications)\n    *   [Execute custom notification commands](#execute-custom-notification-commands)\n*   [How does it work](#how-does-it-work)\n*   [Other use cases](#other-use-cases)\n    *   [Use inside a docker container](#use-inside-a-docker-container)\n*   [Contributing](#contributing)\n*   [References](#references)\n\n## Use cases\n\n*   When you have already started a process in a pane and wish to be notified (i.e. you can't use a manual trigger).\n*   Working in different containers (Docker) -\u003e can't choose the shell -\u003e and can't use a shell-level feature.\n*   Working over ssh, but your Tmux is on the client side.\n\n## Pre-requisites\n\n*   Bash\n*   Tmux\n*   `notify-send` or `osascript`.\n*   **Optional**: `wget` (for telegram notifications).\n\n\u003e \\[!NOTE]\\\n\u003e Works on Linux and macOS (note: only actively tested on Linux).\n\n## Install\n\nUsing [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm), add:\n\n    set -g @plugin 'rickstaa/tmux-notify'\n\nto your `.tmux.conf`.\n\nUse `prefix + I` to install.\n\n## Usage\n\n*   `prefix + m`: Start monitoring a pane and notify when it finishes.\n\n*   `prefix + alt + m`: Start monitoring a pane, return it in focus and notify when it finishes.\n\n*   `prefix + M`: Cancel monitoring of a pane.\n\n\u003e \\[!IMPORTANT]\\\n\u003e There is a known issue with alt-based Tmux shortcuts on osx. If you encounter problems, please check [this post](https://superuser.com/questions/649960/option-key-does-not-work-as-meta-in-tmux) for a workaround.\n\n## Configuration\n\n### Enable verbose notification\n\nThe default notification text is `Tmux pane task completed!`. This tool also contains a verbose output option which gives more information about the pane, window, and session the task has completed.\n\n\u003e To enable this, put `set -g @tnotify-verbose 'on'` in the `.tmux.conf` config file.\n\n#### Change the verbose notification message\n\nTo change the verbose notification text, put `set -g @tnotify-verbose-msg 'put your notification text here'` in the `.tmux.conf` config file. You can use all the Tmux variables in your notification text. Some useful Tmux aliases are:\n\n*   `#D`: Pane id\n*   `#P`: Pane index\n*   `#T`: Pane title\n*   `#S`: Session name\n*   `#I`: Window index\n*   `#W`: Window name\n\nFor the complete list of aliases and variables, you are referred to the `FORMATS` section of the [tmux manual](http://man7.org/linux/man-pages/man1/tmux.1.html). You can also add a notification title using `set -g @tnotify-verbose-title`. Doing so will move the verbose notification text into the notification body.\n\n### Change monitor update period\n\nBy default, the monitor sleep period is set to 10 seconds. This means that tmux-notify checks the pane activity every 10 seconds.\n\n\u003e Put `set -g @tnotify-sleep-duration 'desired duration'` in the `.tmux.conf` file to change this duration.\n\n\u003e \\[!WARNING]\\\n\u003e Remember that there is a trade-off between notification speed (short sleep duration) and the amount of memory this tool needs.\n\n### Add additional shell suffixes\n\nThe Tmux notify script uses your shell prompt suffix to check whether a command has finished. By default, it looks for the `$`, `#` and `%` suffixes.\n\n\u003e Put `set -g @tnotify-prompt-suffixes 'put your comma-separated bash suffix list here'` in the `.tmux.conf` file to add additional suffixes.\n\n\u003e \\[!NOTE]\\\n\u003e Feel free to open [a pull](https://github.com/rickstaa/tmux-notify/pulls) request or [issue](https://github.com/rickstaa/tmux-notify/issues) if you think your shell prompt suffix should be included by default.\n\n### Enable telegram channel notifications\n\n\u003e \\[!WARNING]\\\n\u003e This feature requires [wget](https://www.gnu.org/software/wget/) to be installed on your system.\n\nBy default, the tool only sends operating system notifications. It can, however, also send a message to a user-specified telegram channel.\n\n\u003e Put `set -g @tnotify-telegram-bot-id 'your telegram bot id'` and `set -g @tnotify-telegram-channel-id 'your channel id'` in the `.tmux.conf` config file to enable this.\n\nAfter enabling this option, the following key bindings are available:\n\n*   `prefix + ctrl + m`: Start monitoring pane and notify in bash and telegram when it finishes.\n\n*   `prefix + ctrl + alt + m`: Start monitoring a pane, return it in focus and notify in bash and telegram when it finishes.\n\nAdditionally, you can use the `set -g @tnotify-telegram-all 'on'` option to send all notifications to telegram.\n\n\u003e \\[!NOTE]\\\n\u003e You can get your telegram bot id by creating a bot using [BotFather](https://core.telegram.org/bots#6-botfather) and your channel id by sending your channel invite link to the `@username_to_id_bot` bot.\n\n### Enable Pushover notifications\n\n\u003e \\[!WARNING]\\\n\u003e This feature requires [curl](https://curl.se/) to be installed on your system.\n\nBy default, the tool only sends operating system notifications. It can, however, also send a message to a user-specified pusher user or group.\n\n\u003e Put `set -g @tnotify-pushover-token 'your pushover application token'` and `set -g @tnotify-pushover-user 'your pushover user or group identifier'` in the `.tmux.conf` config file to enable this.\n\n\u003e You may optionally put `set -g @tnotify-pushover-title 'The title of the message'` to override the default title\n\n\u003e \\[!NOTE]\\\n\u003e You can create a free pushover account at [pushover.net](https://pushover.net/).\n\n### Execute custom notification commands\n\nYou can execute a custom command after a process has finished by putting `set -g @tnotify-custom-cmd 'your custom command here'` in the `.tmux.conf` file. The custom command is executed in the pane where the process has finished. If you want to execute multiple commands, you can also put them in a bash script and execute this script (i.e. `set -g @tnotify-custom-cmd 'bash /path/to/script.sh'`).\n\n\u003e \\[!WARNING]\\\n\u003e The custom command is executed using the `eval` command, so [be careful with what you put in here](https://stackoverflow.com/a/17529221/8135687).\n\n\u003e \\[!NOTE]\\\n\u003e Please consider contributing to [this repository](https://github.com/rickstaa/tmux-notify) if your custom command is useful for others.\n\n## How does it work\n\nA naive approach. Checks if pane content ends with the bash prompt suffixes mentioned above every 10 seconds.\n\n## Other use cases\n\n### Use inside a docker container\n\nBecause tmux-notify uses [libnotify](https://gitlab.gnome.org/GNOME/libnotify) to send notifications, it needs access to the host's D-Bus socket. An excellent guide on how to do this can be found [here](https://github.com/mviereck/x11docker/wiki/How-to-connect-container-to-DBus-from-host#dbus-user-session-daemon). You can also check out the [examples/docker](examples/docker/README.md) folder for an example.\n\n## Contributing\n\nFeel free to open an issue if you have ideas on how to make this GitHub action better or if you want to report a bug! All contributions are welcome :rocket:. Please consult the [contribution guidelines](CONTRIBUTING.md) for more information.\n\n## References\n\n*   The initial version of this tool was developed by [@ChanderG](https://github.com/ChanderG).\n*   Icon created with svg made by [@chanut](https://www.flaticon.com/authors/chanut) from [www.flaticon.com](https://www.flaticon.com/authors/chanut)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frickstaa%2Ftmux-notify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frickstaa%2Ftmux-notify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frickstaa%2Ftmux-notify/lists"}