Implement a command line control (dunstctl)#651
Conversation
d079bad to
ad848be
Compare
Stunkymonkey
left a comment
There was a problem hiding this comment.
testing the cl-interface everything works fine.
| method_call "${DBUS_IFAC_DUNST}.NotificationShow" >/dev/null | ||
| ;; | ||
| "status") | ||
| property_get running | ( read _ _ status; printf "%s\n" "${status}"; ) |
There was a problem hiding this comment.
can produce the output if dunst is not running:
$ dunstctl status
Error org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
is this wanted?
| || die "No status parameter specified. Please give either 'true' or 'false' as running parameter." | ||
| [ "${2}" == "true" ] || [ "${2}" == "false" ] \ | ||
| || die "Please give either 'true' or 'false' as running parameter." | ||
| property_set running variant:boolean:"${2}" |
There was a problem hiding this comment.
the same applies here from above
| " <interface name=\""DUNST_IFAC"\">" | ||
|
|
||
| " <method name=\"ContextMenuCall\" />" | ||
| // TODO: add an optional parmater definining the action of notification number X to invoke |
There was a problem hiding this comment.
i skipped reading through this file, because there are too much TODOs and FIXMEs.
but testing wise, everything works perfectly fine for me.
|
@bebehei Looking at the TODOs in the first message this looks almost done, will you work on it or maybe I should take over? I'd like to finish this and make a release soon-ish. |
|
when continuing, also look at this: bebehei#2 |
|
@tsipinakis Well, sad news. @Stunkymonkey and I started a new project together and our goal is to rewrite dunst in Rust. You may have seen it already in your GitHub timeline, it's called Beginning with the lockdown for the corona pandemic, I've got more time to contribute to OSS projects again. In relation to the durst notification manager, I'll continue to help here in dunst. But my long term goal will be the switch to durst. So yes, I won't finish this PR here in its full intention. Feel free to clone the branch and continue (or start over and rewrite commits). I won't have the necessary power and motivation to finish this PR. |
|
PS: If you want to join the project, we'd be happy to have you there. |
I saw you creating the repo, but at the time it was just a hello world. I'll post some of my thoughts in an issue in that repo later today :) |
|
@bebehei Mind giving this a review? I completed pretty much everything still in progress I could find, and scrapped the |
Codecov Report
@@ Coverage Diff @@
## master #651 +/- ##
==========================================
- Coverage 66.40% 66.29% -0.11%
==========================================
Files 29 29
Lines 4899 5076 +177
==========================================
+ Hits 3253 3365 +112
- Misses 1646 1711 +65
Continue to review full report at Codecov.
|
|
I'll review this now. |
bebehei
left a comment
There was a problem hiding this comment.
Shall I review my own code, too?
|
Fixed.
Of course 😉 |
As suggested in dunst-project/dunst#216 (comment). /tmp should be cleared on boot. Note that notifications is still turned on when starting i3. That way we override whatever the default behaviour of dunst is (it defaults to on) and we force the state to appear in i3status by creating the state file. This is fine while waiting for dunstctl (dunst-project/dunst#651).
|
I'm basically done here I think. |
`==` is not supported in plain sh
|
I timed out waiting for @bebehei, I'll just merge this for now to have something usable in master. Any other fixes can be done later. I'd like to see this tested for some weeks before making a release, if you do use it please report your experience with it and any bugs you find. |
|
Hi. This PR doesn't resolve #308 right? The history-pop command just re-displays the notifications from history and they again go back to the history stack after click/timeout. let me know if there's a command to remove a notification from history. |
|
No you're right. I do not plan on implementing that feature any time soon, but you could implement it yourself. Otherwise, subscribe to the issue and you'll hear when it's implemented |
|
@fwsmit So if I understand correctly now all keybindings from |
Yes. There was already a warning in the documentation about the shortcuts section being deprecated for a while now. All settings in the |
|
I see, thanks for the clarification. I ran |
Work in progress, I expect to be finish & polish it during the next week.
Fixes:
TODO:
dunstctlto support debugging later.