- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
每当使用 dbus-monitor 到达桌面通知时,我都会尝试触发 python 脚本或 shell 脚本
我以这种方式使用命令
dbus-monitor "interface='org.freedesktop.Notifications'" | grep --line-buffered "string" | xargs -I '{}' python3 ./test.py {}
之后,我尝试使用从另一个终端发送桌面通知
string "notify-send"
string ""
string "hello"
string "world "
string "urgency"
string "notify-send"
string ""
string "hello"
string "world "
string "urgency"
但是如果我的这个命令的输出是 10 行,那么每行都会调用 python 脚本。
最佳答案
明智的做法是利用 systemd
与 dbus
集成.
使用 systemd
集成编程器比 dbus
有更好的控制/传感器一体化。也可以利用 systemd
日志/监控机制。
有一篇好文章here关于 systemd dbus 和 python ..
在此 answer 中也有与您的问题非常相关的答案.也是。
关于python - 调试监视器输出读数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68794467/
我在将一些 C++ 代码转换为 Arduino 时遇到问题。任何帮助,将不胜感激。 编辑 我已经成功完成了上述操作。然而,现在唯一的问题是我的 Arduino 代码准确而正确地读取了电压,但没有其他寄
我需要能够从 HealthKit 读取所有 HRV 读数,并根据它们的创建日期对它们的值进行排序。 我可以使用 SampleQuery 从 HealthKit 读取特定时间间隔内的所有读数,如下所示:
我正在尝试使用 arduino uno R3 从 DHT-11 传感器读取温度和湿度 #include #include #define DHTPIN A3 #define DHTTYPE DHT
伙计们,我是 Meteor 的新手。对于我目前的应用程序,我正在使用 openlayer,因此对于 openlayer,我调用 Template.map.onRendered 事件,该事件将加载一个
我有一个设备可以读取电气设备的 kw 值,以测量它们在特定时间的(能量消耗率)。然后将这些值发送到轮询器(它定期向设备询问这些值),并插入到数据库中。 例子: 1st reading - 10 kw
我是一名优秀的程序员,十分优秀!