{"id":13524811,"url":"https://github.com/marzocchi/zsh-notify","last_synced_at":"2025-04-04T12:07:49.953Z","repository":{"id":4235723,"uuid":"5359525","full_name":"marzocchi/zsh-notify","owner":"marzocchi","description":"Desktop notifications for long-running commands in zsh.","archived":false,"fork":false,"pushed_at":"2023-09-26T17:21:01.000Z","size":82,"stargazers_count":522,"open_issues_count":3,"forks_count":81,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-28T11:07:42.526Z","etag":null,"topics":["antigen","applescript","desktop-notifications","iterm2","linux","macosx","notifier","oh-my-zsh","shell","zgen","zsh"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":false,"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/marzocchi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2012-08-09T18:33:38.000Z","updated_at":"2025-03-24T06:40:47.000Z","dependencies_parsed_at":"2022-08-17T20:00:31.993Z","dependency_job_id":"e413f710-9dc6-41f4-80e2-683fc3ff3511","html_url":"https://github.com/marzocchi/zsh-notify","commit_stats":{"total_commits":77,"total_committers":33,"mean_commits":"2.3333333333333335","dds":0.8051948051948052,"last_synced_commit":"f94a5117467fddd61f5884e0d40d0d3159312c55"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marzocchi%2Fzsh-notify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marzocchi%2Fzsh-notify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marzocchi%2Fzsh-notify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marzocchi%2Fzsh-notify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marzocchi","download_url":"https://codeload.github.com/marzocchi/zsh-notify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247174418,"owners_count":20896078,"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":["antigen","applescript","desktop-notifications","iterm2","linux","macosx","notifier","oh-my-zsh","shell","zgen","zsh"],"created_at":"2024-08-01T06:01:13.654Z","updated_at":"2025-04-04T12:07:49.911Z","avatar_url":"https://github.com/marzocchi.png","language":"Shell","funding_links":[],"categories":["Plugins","Command Line","Shell"],"sub_categories":["ZSH on Windows","Dependency Management","Zinit (née zplugin)"],"readme":"zsh-notify\n===\n\nDesktop notifications for long-running commands in ZSH.\n\nSupported terminals\n---\n\n- On macOS: Terminal.app or [iTerm2][iterm2];\n- On Linux (and possibly other systems): any terminal application should be\n  supported as `xdotool` and `wmctrl` are used to query and modify windows\n  state.\n  \nSetup and usage\n---\n\n### Prerequisites\n\n#### macOS\nInstall [terminal-notifier.app][terminal-notifier] (default*)\n\n_When using `tmux` on Yosemite:_\n\n`reattach-to-user-namespace` is required to prevent `terminal-notifier` from hanging\n(see [julienXX/terminal-notifier#115][issue115] for details).\n\n\n\n#### Linux/Other\n\nInstall `notify-send` (default*) -- available in [libnotify][libnotify], `xdotool` and `wmctrl`\n\n---\n\n\\* _usage of custom notifiers is described in [Configuration](#configuration)_\n\n### Installation\n\nJust clone this repository and source `notify.plugin.zsh` in your `~/.zshrc`,\nor see below for instructions on installing with some popular package managers.\n\nConfiguration\n---\n\nThe behavior of zsh-notify can be modified by using `zstyle` **after**\nsourcing `notify.plugin.zsh`.\n\n- Set a custom title for error and success notifications, when using the\n  built-in notifier.\n\n        zstyle ':notify:*' error-title \"Command failed\"\n        zstyle ':notify:*' success-title \"Command finished\"\n\n    The string `#{time_elapsed}` will be replaced with the command run time.\n\n        zstyle ':notify:*' error-title \"Command failed (in #{time_elapsed} seconds)\"\n        zstyle ':notify:*' success-title \"Command finished (in #{time_elapsed} seconds)\"\n\n- Change the notifications icons for failure or success. Provide the path to an\n  image, or an URL if you are on macOS.\n        \n        zstyle ':notify:*' error-icon \"/path/to/error-icon.png\"\n        zstyle ':notify:*' success-icon \"/path/to/success-icon.png\"\n    \n    [Try this][dogefy.sh]. Wow.\n\n- Play sounds with error and success notifications when using the built-in\n  notifier. Provide the path to an audio file, or the name of an \"alert\" sound\n  if you are on macOS.\n\n        zstyle ':notify:*' error-sound \"Glass\"\n        zstyle ':notify:*' success-sound \"default\"\n\n- Have the terminal come back to front when the notification is posted.\n\n        zstyle ':notify:*' activate-terminal yes\n\n- Disable setting the urgency hint for the terminal when the notification is\n  posted (Linux only).\n\n        zstyle ':notify:*' disable-urgent yes\n\n- Set a different timeout for notifications for successful commands\n  (notifications for failed commands are always posted).\n\n        zstyle ':notify:*' command-complete-timeout 15\n\n   The default value is 30 seconds.\n\n- Set application name in notification if set.\n  If this value is not set it will strip the name from message.\n  (only notify-send).\n\n        zstyle ':notify:*' app-name sh\n\n   The default value is ''.\n\n- Set a expire time in notifications\n  (only notify-send).\n\n        zstyle ':notify:*' expire-time 2500\n\n   The default value is undefined milliseconds (disabled).\n\n- Replace the built-in notifier with a custom one at `~/bin/my-notifier`. The\n  custom notifier will receive the notification type (`error` or `success`) as\n  the first argument, the time elapsed as the second argument, and the\n  command line as standard input.\n\n        zstyle ':notify:*' notifier ~/bin/my-notifier\n\n- Use the time elapsed even when the command fails (by default, notifications\n  for command failures are not conditional on the elapsed time).\n\n        zstyle ':notify:*' always-notify-on-failure no\n\n- Set a blacklist of commands that should never trigger notifications, using a\n  regex support by grep's extended regular expression syntax:\n\n        zstyle ':notify:*' blacklist-regex 'find|git'\n\n- Enable when connected over SSH, which is disabled by default.\n\n        zstyle ':notify:*' enable-on-ssh yes\n\n- Disable error reporting (or send it somewhere else)\n\n        zstyle ':notify:*' error-log /dev/null\n\n- Force checking of the `WINDOWID` variable on every command:\n\n        zstyle ':notify:*' always-check-active-window yes\n\n- Ignore checking if the terminal is focused at all:\n\n        zstyle ':notify:*' check-focus no\n\n[terminal-notifier]: https://github.com/alloy/terminal-notifier \n[libnotify]: https://github.com/GNOME/libnotify\n[iterm2]: http://www.iterm2.com/\n[dogefy.sh]: https://gist.github.com/marzocchi/14c47a49643389029a2026b4d4fec7ae\n[issue115]: https://github.com/julienXX/terminal-notifier/issues/115\n\n## Installation with package managers\n\n### [Antigen](https://github.com/zsh-users/antigen)\n\nAdd `antigen bundle marzocchi/zsh-notify` to your `.zshrc` with your other\nbundle commands.\n\nAntigen will handle cloning the plugin for you automatically the next time you\nstart zsh. You can also add the plugin to a running zsh with `antigen bundle\nmarzocchi/zsh-notify` for testing before adding it to your `.zshrc`.\n\n### [Fig](https://fig.io)\n\nFig adds apps, shortcuts, and autocomplete to your existing terminal.\n\nInstall `zsh-notify` in just one click.\n\n\u003ca href=\"https://fig.io/plugins/other/zsh-notify_marzocchi\" target=\"_blank\"\u003e\u003cimg src=\"https://fig.io/badges/install-with-fig.svg\" /\u003e\u003c/a\u003e\n\n\n### [Oh-My-Zsh](http://ohmyz.sh/)\n\n1. `git clone git@github.com:marzocchi/zsh-notify.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/notify`\n2. Add zsh-notify to your plugin list - edit `~/.zshrc` and change `plugins=(...)` to `plugins=(... notify)`\n\n**Note:** when cloning, specify the target directory as `notify` since\nOh-My-Zsh expects the plugin's initialization file to have the same name as\nit's directory.\n\n### [Zgen](https://github.com/tarjoilija/zgen)\n\nAdd `zgen load marzocchi/zsh-notify` to your .zshrc file in the same function\nyou're doing your other `zgen load` calls in.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarzocchi%2Fzsh-notify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarzocchi%2Fzsh-notify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarzocchi%2Fzsh-notify/lists"}