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
New command line control #445
Comments
Duplicate/relevant: #284 |
I started work on it: https://github.com/bebehei/dunst/tree/dunstcmd
|
Hey! Thanks for all the work on this. I've seen this issue linked from quite a few others. Is there a status update on the ability to be able to query whether or not dunst is paused or not? I've recently switched to dunst and normally just have a toggle switch to switch on or off notifications. It's sort of killing me that there seemingly isn't a good way to query for that info in dunst. |
Not much to update, it's on the roadmap but the progress is only what you see on the branch above. I'm not sure if @bebehei is still planning to work on this. |
Yes, I had been on it. But in the meantime, I actually don't know whether I'm finishing the client side in C. The current architecture for the client is ugly. I'd actually prefer Python for the client (or have a try with Rust). On the server side, the problems are solved and the architecture is clear. The intended feature set is not yet implemented on the server side, but that's an easy game. |
The server side is "finished". I dropped the C-client. @Stunkymonkey will finish the client side. We've settled with Rust. |
That's awesome, I've been trying to learn rust recently and this is yet another excuse to get to it. Is there a repo set up somewhere for it? (Or are we putting it in here along with everything else?) |
There is a project, but it's currently hidden and just for test usage. Idk if we should put it into the main repo. We actually should be client agnostic and we're adding a shitload of compilation dependencies by choosing Rust. But on the other hand side, If we won't ship the client, nobody will ever use it. |
so the first prototype is working:
the error handling is done for arg-parsing, but not for dbus. now we have to discuss where to put the code. yes it would add a lot of dependencies, but I think otherwise it will not be used, because the installation is an extra step. |
Publish! publish! publish! 🎉 |
Yay! I think it's ready for a published first version! 🎉 About where to put it, I don't have a clear opinion yet, I'll just put my train of thought based on the arguments mentioned so far here and wait some feedback before I solidify it. If we put it in this repository:
If we split it out into a different project
|
I think this is the major disadvantage.
Do we really need alternative clients? The dbus interface would not be documented, but if someone needs access to it can be looked up through code. Mostly the feature-set would be the same in the end, because it is limited by the dbus methods and propertys. |
To me, the second paragraph is absoultely new to me. I never thought about it this way. But it's actually the absolute killer argument: I don't want to document the DBus Interface and write a new API docs for it. |
That's a good argument indeed. However we should treat changes to the dbus interface as backwards incompatible/avoid them where possible to avoid affecting those that do want to use it. |
Well yes, this is easy. We just have to proceed with our interface name. It's a common style to suffix the DBus Interface name with an incrementing number, starting with 0. So, we just increment the number on backwards incompatible changes. And alternative clients will intentionally break until the breaking changes are considered. |
here it is my dummy repo |
After taking some time to think about it I also support merging it in this repo, with all said above considered the main argument that made me solidify it is that most if not all users will want some type of shortcut to control dunst and given that we're deprecating the keyboard shortcuts this will be the only way to do it. |
it is still a big question if settling with rust is the right idea. The little program i wrote works fine, but adds a lot of dependencies. |
That's my one remaining concern, this looks like a very thin and simple client to warrant a new language and build tools. @bebehei Why did you give up on writing the client in C in the first place? |
maybe a bash script could be enough.
this can do the same thing my programm is doing |
@tsipinakis I mainly gave up writing the client in C, because it's just overhead, overhead, overhead, overhead, overhead and then a few lines of code, which are actually crucial. A few stats: In the dunstcmd branch, I created the client files, which had ~500 LOC of C. And I had only support for the status. @Stunkymonkey implemented almost everything in <200 LOC of Rust. To achieve a proper subcommand structure, I had enormous overhead. It started to feel wrong even when I initially started the client. And looking at the code again, I'm confident to say: C is the wrong language for the client. I'm not yet confident to say Rust is the right language for the client. I'm pretty unsure, if bash is suited better as the client. If I had to choose a language now besides Rust, it might be python. |
Ok, looking at the code myself now I have to agree that's a lot of overhead for little functionality. C is obviously way too much here. I'd be hesitant to use bash because IMO it limits our ability to expand this out further if needed. The complexity of bash scripts tends to increase exponentially as features are added. Like you, I'm also unsure of the language to choose now, python seems like a good fit as, the only downside would be the added runtime dependencies (to |
i would still prefer posix-shell. |
I am not sure if we will enhance it with many features in the future. The amount of keyboard shortcuts was also not increasing over time. |
have a look at https://github.com/Stunkymonkey/dunstctl/blob/master/dunstctl |
Huh, that managed to change my mind. I actually prefer that a lot more than anything else proposed until now. If anything, it's just shell so we're not adding any extra dependencies - if we hit some issue we can always re-write it since it's that simple. |
I've currently taken it under revision and pack it into my branch. A PR will follow probably tomorrow. |
It would be useful if we could get the number of notifications received for when dunst is muted. |
The initial implementation of this was merge in #651, so I'll close this. Any other feature requests should be separate issues. |
We should write a command line control for dunst.
Currently, control takes place only via keyboard and a some hackish way via notifications. These notifications are effective, but quite ugly and the keyboard shortcuts are not working on some environments.
I propose to add a new binary, which can send commands to the dunst server via an additional DBus interface.
The features, this command line tool should have:
This would in addition fix/invalidate all of these issues.
#308 #307 #216 #171 #103 #112 #138 #284 #241
The text was updated successfully, but these errors were encountered: