DEV Community

Discussion on: My Favorite Linux Tools

Collapse
ashleemboyer profile image
Ashlee (she/her)

notify-send looks like a good one! I like the example you gave. Might have to give this one a try.

Collapse
antjanus profile image
Antonin J. (they/them) Author

It's sooo easy to use. I tried to make an alternative for powershell on windows and had to install an additional tool 😞.

I do believe it's Ubuntu only but other systems should have something similar available

Collapse
flrnd profile image
Florian Rand

That statement ubuntu only is dangerous sir!

Collapse
scottharwoodtech profile image
ScottHarwoodTech • Edited on

Since you use ZSH, you can enable hooks which will automatically notify you when your command takes more than a certain amount of time gist.github.com/jpouellet/5278239 this was my starting point, I expanded it to send me a notifiy-send message with the info instead of just triggering a alert.

Collapse
ghost profile image
Ghost

in fact notify-send is part of libnotify which at least in Gentoo is a dependency of wxGTK, in Linux if it works in one distro it works on all of them (with different levels of difficulty)

Thanks for the tip, I wasn't aware of this and is much more elegant than my current way, appending mpv (CLI media player) with some noise after the long command :D

Thread Thread
antjanus profile image
Antonin J. (they/them) Author

oooh interesting. Thanks for chiming! i went to check if it works on Arch (I switch between Arch/Ubuntu every couple of years) and it looks like it's required by gnome and a bunch of other packages. So, cool! :)

Glad I could help!

Collapse
darksmile92 profile image
Robin Kretzschmar

Yes this one particually is interesting because we all know the struggle of long running processes where we end up surfing or doing something else and totally forget to check back if it is done 😅

Collapse
jrohatiner profile image
Judith

That is so true! Good to know other people do it too! 😂

Collapse
biros profile image
Boris Jamot ✊ /

Have a look at fish shell, notifications for long running processes are built-in !

Collapse
alexsasharegan profile image
Alex Regan

I didn't find it on Pop!_OS by default. Installing it was confusing since you actually install libnotify-bin... so heads up for anyone looking for it!

Collapse
antjanus profile image
Antonin J. (they/them) Author

Yeah, I guess I should specify to check out what kind of notification utilities your specific flavor of Linux supports/has. notify-send is dead-simple in usage so I hope other OSes are as well.

I was remarking on the fact that Windows/Powershell still sucks with this because you gotta make a whole script for it.

For anyone interested in how PS handles this: you can install BurntToast and write a 1-liner function function letmeknow {New-BurntToastNotification -Text "I'm letting you know!", "Something you wanted to happen, happened"} in your ps1 profile script.

Thread Thread
jrohatiner profile image
Judith

@antoninjanuska u bring up a good point here. There are so many mitigating factors in configuring a shell env. For me, this took time to really grasp this concept and once I did, game changer! 👏👏

Collapse
flrnd profile image
Florian Rand

You can download the Source Code from here and compile It for your distro: galago-project.org/downloads.php although maybe it's not so straight forward, never tried to compile it since Debian has binary packages. There is a shell scrip version from Arch Linux users you can also try.