mirror of
https://github.com/asciinema/asciinema.git
synced 2026-04-25 16:05:52 +03:00
[PR #344] [MERGED] Notifications #1052
Labels
No labels
bug
compatibility
feature request
fit for beginners
help wanted
hosting
idea
improvement
packaging
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asciinema#1052
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/asciinema/asciinema/pull/344
Author: @ku1ik
Created: 3/30/2019
Status: ✅ Merged
Merged: 9/8/2019
Merged by: @ku1ik
Base:
develop← Head:feature/notifications📝 Commits (7)
79bdfafFix double quote escaping in AppleScript notifier8321b69Add libnotify notifier4e66afcAdd terminal-notifier support81cf7c1Use icon with send-notify and terminal-notifier3a7c1a6Custom notification command + disabling notificationsa9f9d8fIgnore empty ("") custom notification command788cc48Explain env var in custom notification command📊 Changes
8 files changed (+107 additions, -15 deletions)
View changed files
📝
README.md(+9 -0)📝
asciinema/commands/record.py(+4 -1)📝
asciinema/config.py(+8 -0)➕
asciinema/data/icon-256x256.png(+0 -0)📝
asciinema/notifier.py(+60 -8)📝
asciinema/recorder.py(+6 -6)📝
setup.py(+1 -0)📝
tests/config_test.py(+19 -0)📄 Description
#340 and #341 added new features that are triggered via key bindings and we should have ability to show a notification that these actions (recording pause, adding a breakpoint) have actually been executed. Without some kind of notification you would never be sure if that worked.
Printing something to the terminal is not a good idea here, since it would potentially overwrite whatever was printed before (in fullscreen apps like vim), so I believe an external tool is the best choice (at least by default).
To have a good out-of-the-box experience we could lean on executing desktop notification utility, like
notify-send(Linux/libnotify),kdialog(Linux/KDE),osascript -e 'display notification ..'(macOS),growlnotify(macOS) etc.The command to use can be auto-detected, like here for example: https://github.com/sickill/git-dude/blob/master/git-dude#L18-L30
Then, a setting in a config file could be supported, sth like
notification_command, which would allow overriding auto-detection, and specifying a command to invoke to notify about pause/resume/setting breakpoint/etc. One could then for example play a sound or show the notification in tmux's status bar (via tmuxdisplay-message).Some part of this was already implemented in #340 (merged).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.