-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow notifications for systems without graphical capabilities #81
Allow notifications for systems without graphical capabilities #81
Conversation
@ammgws Thanks for your work on this. I set this up on a remote server to test. I copied # Set up done for remote notitfication via Telegram
set -U __done_allow_nongraphical 1
set -U __done_notification_command "ta \$title \$message" Running a command longer than the default 5 seconds would generate a notification via my I then increased the time before done sends a message to one minute with: # in milliseconds time before done sends a message
set -U __done_min_cmd_duration 60000 This works as we discussed in #80. I also added: ## Commands not to send done messages for. Accepts a regex
# all git commands, except push and pull.
# nano
set -U __done_exclude 'git (?!push|pull)|nano' As who wants to be notified when they finish a long edit on a document? Consider adding something like the following to the documentation section Prevent specific commands from triggering notifications. Accepts a regex. something like:
All in all a 👍, thanks! |
Good to know it's working! I'll leave docs up to @franciscolourenco as I think it's fine |
I found this blog post that says with X11 forwarding turned on for a SSH connection that that I have not yet had time to test this with ### Notify on long command completion
# If commands runs >= 10 seconds, notify user on completion
if test $CMD_DURATION
if test $CMD_DURATION -gt (math "1000 * 10")
set secs (math "$CMD_DURATION / 1000")
notify-send "$history[1]" "Returned $status, took $secs seconds"
end
end If this works with |
If it works you should open another PR for adding it to the docs |
@ammgws If it was only that simple. I could not get this to work between two Ubuntu machines. One 16.04 and the other 18.04. I tried a number of settings locally in the The notifications are sent via the DBUS. I tried setting the If someone smarter that me can figure this out so that it can be documented, so be it. 😉 😎 👼 |
Closing due to inactivity |
@ammgws What is the status of this? Is it working, reliable? |
I made this for @frederickjh, so will need his input |
@franciscolourenco and @ammgws Sorry I didn't realize that more input was needed from me. I thought that my comments above were clear as to the status of this pull request. To summarize what I stated above:
|
Actually there was one thing I thought should be added to the documentation. From above:
|
@ammgws I've had a look at the PR and it looks good, so I would be up for merging this. Do you think it makes sense to add what @frederickjh to the docs, and if so would you mind doing it? Thanks! |
@franciscolourenco done 🐟 |
Any reason @franciscolourenco this has not yet been merged in? Looks like this has everything to close #80. |
Sorry, only was able to get to this. |
No problem @franciscolourenco. Sometimes life happens. |
Solves #80.
@frederickjh Would you like to test this?