Dunst: 重新加载 dunstrc 的信号

创建于 2012-09-14  ·  15评论  ·  资料来源: dunst-project/dunst

最有用的评论

我的解决方法是killall dunst;notify-send foo 。 在 debian 上运行良好。

所有15条评论

不会执行

那会非常方便:/

我的解决方法是killall dunst;notify-send foo 。 在 debian 上运行良好。

@knopwob :为什么不呢? 有什么东西阻止了吗?

@knopwob :为什么不呢? 有什么东西阻止了吗?

因为上面发布的解决方法足够好,恕我直言。

@Eizen @tsipinakis你的意见? 如果您另有想法,请随时重新打开此问题。

已经提到了一个解决方法,我不认为重新加载配置是需要经常做的事情,所以我不确定实现它会有多大用处。

话虽如此,如果有我没有考虑过的用例,我会重新打开它。 @piahoo你能详细说明你为什么需要这个功能吗?

这究竟是如何工作的? 这在很大程度上取决于您如何开始 Dunst。 我在我的 i3 配置中使用了一个简单的方法: exec --no-startup-id dunst 。 就地重新启动 i3 或重新加载 i3 时,不会执行 with。
这使得重新加载 dunst 配置非常烦人。
@tsipinakis

@luan来自 i3 的文档:
"if you need a command to run also when restarting i3 you should use the exec_always keyword"

您可以轻松地使用: exec_always --no-startup-id dunst作为解决方法。 除了任何其他用例之外,还可以使用具有先前解决方法的键绑定,例如在 i3 中: bindsym $mod+Shift+d --release exec --no-startup-id killall dunst;notify-send foo 。 所以到目前为止,我并没有真正看到实现这一点的正当理由。

正如@Eizen所说。 还希望您使用 dbus 服务,以便在发送通知时自动启动 dunst。 你有什么理由手动启动 dunst @luan吗?

作为现在的解决方法,我使用sudo pkill dunst然后dunst -config ~/.config/dunst/dunstrc &

编辑(@bebehei):请不要在杀死它后手动启动它。 DBus 在那里提供了很好的服务并自动重新启动程序。 使用“官方解决方法”killall dunst;notify-send foo

@Aeres-u99 它没有提供很好的服务。
killall dunst对我不起作用(我不知道 D-Bus 正在考虑什么其他程序)并且 Arch Wiki

Note: It may seem like there's no need to manually start dunst, as it may get autostarted by dbus-daemon when programs send notifications through D-Bus. However, the notification service frequently has multiple daemons installed, and there is no way to know which daemon will be autostarted. The dbus-daemon maintainers explicitly warn against relying on autostart for multiple-provider services.

@tsipinakis One 每次更改配置时都会重新加载dunst 。 我认为这通常就足够了。

完成后,可以添加 #651 。

这里的主要问题是无法在普通通知 API 之外向 dunst 发送命令。 这样这个问题就解决了。

我不知道 D-Bus 正在考虑什么其他程序

您可以通过以下方式了解:
grep -r Notifications /usr/share/dbus-1/services/

notify-send而 Dunst 未打开只是无限期挂起。 dbus 不会自动为我启动 dunst,即使grep -r Notifications /usr/share/dbus-1/services/./usr/share/dbus-1/services/org.knopwob.dunst.service:Name=org.freedesktop.Notifications

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

existme picture existme  ·  4评论

chronus7 picture chronus7  ·  5评论

knopwob picture knopwob  ·  5评论

Anachron picture Anachron  ·  4评论

phuhl picture phuhl  ·  3评论