What are the alternatives for notify-send?
Solution 1:
I took a look at yad as suggested by Paddy Landau. It allowed me to display a notification without a window border, that did not steal focus, and that automatically closed after 1 second. I could not find a way to change the window background color, but I could change the text color and size using Pango Text Attribute Markup Language. The following script increases volume by 3% then displays the current volume level using yad:
#!/bin/bash
amixer -q -D pulse sset Master 3%+
VOLUME=`awk -F"[][]" '/Front Left.*Playback/ { print $2 }' <(amixer -D pulse sget Master)`
yad --timeout 1 --skip-taskbar --center --no-buttons --text="Volume:" --width=200 --text-align=center --undecorated --text="<span color=\"#ffffff\" bgcolor=\"#000000\" font_size=\"large\" font_weight=\"heavy\"> Volume: $VOLUME </span>"
Solution 2:
My suggestion is to use yad, which is a fork of Zenity.
Installation:
sudo apt install yad
If not available on your version, first run the following:
sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt update
Learn about yad
:
man yad
It is not an ideal solution, but yad is powerful and flexible, and it has a time-out option.