I´ve got a question regarding zenity.
What I want to do is display my total data usage of my web-stick for the current day in a message box. I found a solution using notify-send:
set name ( vnstat --iface ppp0 -s | sed '1,6d' | head -n1 | awk '{ print $8 }' );and notify-send -t 5000 "Info" "bisheriger Verbrauch: $name MB"
Another method, which allows me to display an icon in addition to the data, is the usage of zenity:
set name ( vnstat --iface ppp0 -s | sed '1,6d' | head -n1 | awk '{ print $8 }' );and zenity --notification --window-icon=/home/rosika/Schreibtisch/work/Downloads/status_on.png --text="bisheriger Verbrauch für ppp0: $name MB"
I use fish as standard shell. Therefore the slightly different syntax.
zenity --notification displays an additional button whis says: "Do default Action". When clicking on it the message box vanishes instantly. Otherwiswe it vanishes after 10 seconds.
My question is: Does clicking on "Do default Action" cause anything other than closing the message box? I don´t want my system to run into any kind of trouble after all.
zenity --notification --text "Hamster"
in the terminal. This is just an example but it produces the button "Do Default Action". – Rosika Jul 04 '18 at 15:46