Can’t read the article, guess I’m out of free reads this month/week. I wish there was some kind of rule against posting medium.com links on HN. That would incentivise people to use some other tools, for example dev.to or personal blogs.
Modernize your Bash Scripts by adding GUI
31–40 of 72 posts
Re: Modernize your Bash Scripts by adding GUI
#32Re: Modernize your Bash Scripts by adding GUI
#33Re: Modernize your Bash Scripts by adding GUI
#34Re: Modernize your Bash Scripts by adding GUI
#35"Tired of displaying raw text on Console?" Nope. I am a scripter. I will never get tired of raw text, but I sure get tired of GUIs, fast. If the author had pitched this as a way to make the scripter's scripts accessible to others who do not understand scripts, I would have a different response.
I feel like notifications would be the only thing on that list I could see myself using. I know you can make the terminal make a noise, but I sometimes prefer visual alerts.
On Linux you can use `notify-send "title" "content"`. The only limitation it has is that you can't query the notification id to update or selectively dismiss it later.
Also, many terminals will have a visual alert instead/together with a sound: konsole does this, for instance.
Re: Modernize your Bash Scripts by adding GUI
#36This is such a backwards way of thinking. Like modernizing math by using little colored blocks with symbols written on them, because your tired of using boring old white and black pencil and paper... It's what you do to entertain children into being interested in something, not how adults get stuff done.
Besides, isn't programming with syntax highlighting pretty much ubiquitous? Since, at this point in history, all programming I'm aware of boils down to a relatively practical application of maths, I'd argue colored blocks have already pretty much supplanted pencil and paper as the interface adults use to get stuff done.
Re: Modernize your Bash Scripts by adding GUI
#37"Tired of displaying raw text on Console?" Nope. I am a scripter. I will never get tired of raw text, but I sure get tired of GUIs, fast. If the author had pitched this as a way to make the scripter's scripts accessible to others who do not understand scripts, I would have a different response.
Last sentence of the first paragraph "But if it is used by a general audience it is obviously good to have some user friendly interactions."
When your script was a bash script chances are you targeted proficient users with it. These might get annoyed by popping up stuff. This means ultimately you are probably better off adding a GUI and a --headless flag so both user categories are happy.
As I see it the only thing that is a little useful are the notifications (e.g. if you have some sort of daemon running in background that needs to bring sth to the users attention)
Re: Modernize your Bash Scripts by adding GUI
#38Re: Modernize your Bash Scripts by adding GUI
#39If 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
Try `notify-send TEXT` instead. E.g. alias n="notify-send Completed."
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
#40Can’t read the article, guess I’m out of free reads this month/week. I wish there was some kind of rule against posting medium.com links on HN. That would incentivise people to use some other tools, for example dev.to or personal blogs.
Just go incognito in the meantime..