-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature request] notify user of action result #64
Comments
Seems like a reasonable request. I'll leave this open until someone is able to submit a PR. Thanks! |
If you all can try out the develop branch, I pushed a commit that should address this request. Let me know if you have suggestions for modifications/improvements! |
Ah yes! I tried to implement this a little while ago, but understanding how to correctly do the glib-nm interfacing proved more difficult than expected. I'll try the new branch now! |
The basics seem to work, many thanks! However, I do have a couple of suggestions. The first is more serious. Say I have Second, some title lines of notifications are rather long. Maybe I've grown too accustomed Third, the message paired to "Rescan wifi networks" shows some odd looking characters, though this could be a bug on my end. |
|
Okay, I probably could've worded this suggestion better. It's not really that the notifications are too long as such, but it's just that the title/summary part is too long for what I'm used to. By default, dunst splits it's notification into a "summary" and "body":
For example, this discarded PR makes use of this split:
I'm using Dunst as well. I'm having another weird issue with this font currently, so it's probably something on my end then. |
Think I got it, some apps try to draw ligatures but show them weirdly. Nothing you can do here. |
You're gonna have to show me some examples of what you mean with the whole body/summary split. In my dunstrc I have |
I see you've significantly shortened the notification messages, so kind of whatever actually. I actually feel kinda of terrible writing so much on a nitpicky, aesthetic preference of mine (and maybe a few others), so please leave it be if you don't care
See the images below. Most OSes (say macOS, and I guess This is an example of what I've been trying to suggest (and what #77 was actually doing). It matches the style of nm-applet. Now, the exact text doesn't match what you've currently implemented, it's just an example. Notice how short the title is (it's a summary, without any details), and how the body and title are styled differently (as is the default in dunst) A similar message, but one that only makes use of the title area (as networkmanager-dmenu currently does) I personally prefer the first notification style, but again, kind of whatever. You can generate the first example by calling something like |
@firecat53 As I worried already, networkmanager-dmenu can send out a notification before a connection is successfully established. The notification is basically instantaneous, whereas the actual connection completes (or fails!) much later. As such, it can happen that networkmanager-dmenu shows that a connection is complete, whereas it actually fails. I'm able to consistently reproduce this with a faulty VPN configuration (the first notification is from I'm pretty sure that something like this could happen when connecting to regular wifi networks too, which defeats the purpose of having notifications. For example, if I switch to a different network, the notification is instantaneous, whereas the actual moment I can acces the internet is seconds later (something |
This is going to be a hard problem to solve (I think) without daemonizing this tool, which is something I intend to avoid. Nm-applet is able to continuously monitor connections and notify when they go up and down for whatever reason because it is always running. I'll reopen the issue and see if I can at least improve notifications for failed connections that are initiated from networkmanager-dmenu. However, if it has to stay running for a significant amount of time to detect these failures then I think maybe we need to reconsider showing the notifications at all. There has to a balance between keeping the simplicity and non-daemon nature of the tool vs user friendliness. |
I understand, thanks for looking into this. |
My programming days are somewhat behind me, and I'm sure this is not the most elegant solution, but an example from the NM documentation gave me an idea on how to get (some) notifications to work without really daemonizing I'm not sure if you actually need dbus to do this, or if you can just rely on existing function parameters to achieve something similar. Given that I have no practical experience with gi/nmlib, I found figuring out what the different variables in nm-dmenu can do somewhat technical. Again, just a suggestion, you might've already thought of something like this but discarded it based on good reasons. |
One feature from
nm-applet
that I miss innetworkmanager-dmenu
are "exit status" notifications. Especially because dmenu itself provides no indication of wether your action was (un)succesfull, and, optionally, why something failed. I therefore often have to rerunnetworkmanager-dmenu
in order to know wether an action has succeeded, sometimes multiple times.Adding notifications when an action is completed (or failed) would remedy the need to run this program multiple times to know what's going on. For example,
nm-applet
uses notifications to let the user know wether the device is in the process of connecting, and, when it finishes, wether the connection attempt was succesfull. It's likely that not everyone needs this (extra) reassurance, so I suppose showing notifications would be made optional. (In a more minimal/unix-y fashion, it could also be an idea to only show failures to the user)This seems easy enough, so I could implement this myself, if/when I find time.
The text was updated successfully, but these errors were encountered: