Let's use sudo apt-get install linux
as an example.
Here is the notify send command: notify-send -i terminal Bash "execution complete"
How could I substitute 'bash' with the entire sudo command? Where the command appears in bold as the title as "execution complete" displays below it as a message. This would be used as a means of notification. Once a command finishes, a notification appears displaying the message.
Others have used ";alert" to utilize notify-send.
notify-send -i terminal Bash "execution complete"
is saved as an alias as 'alert,' I'd like to add to this alias for the sake of convenience.
alias alert_helper='history|tail -n1|sed -e "s/^\s[0-9]+\s//" -e "s/;\s*aler$ alias alert='notify-send -i terminal "$(alert_helper)" "execution complete"'
– atlaspaine Nov 14 '14 at 04:02