News for hackers. Stuff that matters.
Re:Modernize your Bash Scripts by adding GUI by dudik on Sunday September 27, 2020 @11:58PM (#24612824)
If you just need to display some text or at most you need a "yes/no" answer that integrates well with your bash script, you could try herbe[1]. I was somewhat inspired by zenity, but it felt too heavy for my minimal use case.

[1] https://github.com/dudik/herbe

Re:Modernize your Bash Scripts by adding GUI by mcstafford on Monday September 28, 2020 @12:51AM (#24613084)
Too heavy? The executable I just built is 19K. I like it for localhost.

Did you wind up picking something else?

Re:Modernize your Bash Scripts by adding GUI by dudik on Monday September 28, 2020 @01:40AM (#24613313)
Sorry for my poor choice of words. What I wanted to say was that I prefer using software that does exactly what I need and nothing else. For some people it might sound silly, but I enjoy the suckless philosophy.
Re:Modernize your Bash Scripts by adding GUI by m463 on Monday September 28, 2020 @01:59AM (#24613399)
I use notifications only for things that take a long time so I can disengage work on something else for a while.

"long build has completed"

is pretty much my primary notification.

Re:Modernize your Bash Scripts by adding GUI by drran on Monday September 28, 2020 @12:50AM (#24613081)
Try `notify-send TEXT` instead. E.g.

  alias n="notify-send Completed."
Re:Modernize your Bash Scripts by adding GUI by yipbub on Monday September 28, 2020 @03:16AM (#24613834)
I use something like:

    echo -e "command\n with a long output,\n and it's last line" |tee /dev/tty| tail -n 1| { read -d '\n' _output ; notify-send "$_output"; telegram-send "$_output"; }
This will send the last n lines of stdout to:

- gnome-notifications

- telegram on my phone from a bot account that uses a unique notification sound

Re:Modernize your Bash Scripts by adding GUI by dudik on Monday September 28, 2020 @01:31AM (#24613278)
Thank you, but I don't use a notification server.
Re:Modernize your Bash Scripts by adding GUI by Spivak on Monday September 28, 2020 @12:26PM (#24618363)
Nothing is stopping you, even if you don't run any kind of GUI session: https://github.com/Sweets/tiramisu
Re:Modernize your Bash Scripts by adding GUI by yipbub on Monday September 28, 2020 @03:10AM (#24613792)
notify-send is for desktop(possibly gnome only?) notifications.
Re:Modernize your Bash Scripts by adding GUI by jlgaddis on Monday September 28, 2020 @09:15AM (#24616276)
notify-send works by sending notifications to a notification daemon (a.k.a., a "notification server", as defined in the "Desktop Notifications Specification").

notify-send won't work for dudik since, as he said, he doesn't use a notification server.