#Get Notified if terminal needs attention or when a command finshes.
14 messages · Page 1 of 1 (latest)
I've never done this, but I think it should be possible if you already have a notification daemon installed
doing a little digging it should be possible to add the following to the pacman.conf
# Hook for transaction completion (after transaction)
# Post-transaction notifications
[Trigger]
Operation = Install
Operation = Upgrade
Operation = Remove
Type = Package
Target = *
[Action]
Description = Notify transaction completion
When = PostTransaction
Exec = /usr/bin/notify-send "Pacman" "Transaction completed."
Depends = libnotify
# Hook for when user input is required (before transaction)
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = *
[Action]
Description = Notify user input required
When = PreTransaction
Exec = /usr/bin/notify-send "Pacman" "User input required for transaction."
Depends = libnotify```
obviously change the notify daemon for whatever you're using
or run a basic bash script, ie)
if command; then 'play mp3 file' ; fi
Thank you .. i will try and let you know ..
_paulm received a thank you cookie!
do i have to split them into two seprate file . or one will do ?
ok .. it needs to be seprated....
i am getting this error -->
(3/5) Notify transaction completion
Error spawning command line “dbus-launch --autolaunch=2de8e8dfa7204b5ebaabda8ce11702dd --binary-syntax --close-stderr”: Child process exited with code 1
error: command failed to execute correctly
also i am not getting notfied when the terminal ask for password to complete installation ..
is it not possible ?
i found this .. https://unix.stackexchange.com/questions/491121/send-a-notification-or-alert-when-bash-asks-for-input-from-user
almost 5 years old , a little hard to grasp , but do you think it will work ? i am on hyprland