[Others] 【插件】dde-shelloutput 定时执行shell并dock显示【2021-05-21】
Tofloor
poster avatar
septemberhx
deepin
2021-05-21 20:23
Author

功能简单的小插件:定时执行 shell 命令,并将结果显示在 dock 上。

 

地址:SeptemberHX/dde-shelloutput-plugin: dde-dock plugin which can run shell commands and show output on dock for Deepin V20 (github.com)

 

如何使用:

1. 从上方地址下载 release 文件,解压后将 *.so 放到插件目录

2. 新建文件 ~/.config/dde-shelloutput/dde-shelloutput.conf 内容如下:

[config]
fontColor=#FFFFFF
width=250
autoWidth=true

[shell]
test\command=date
test\interval=1
test\intervalType=0
test\name=test
test\regExp=\\d{2}:\\d{2}:\\d{2}

 

其中:

* fontColor 为字体颜色

* width 为显示宽度,仅在 autoWidth = false 时生效

* autoWidth = true 或者 false,显示宽度自适应输出内容

* [shell] 下为具体的 shell 配置

* test: 配置的名称,所有 test\ 开头的配置均归属于 test 配置

* test\command:具体想要执行的命令

* test\interval:循环执行的时间间隔,整数

* test\intervalType:1 表示 秒,2 表示 分钟,3 表示 小时

* test\name:名称

* test\regExp:针对命令输出的 正则表达式,插件仅显示匹配后的结果;空表示直接输出

 

上面的配置文件效果如下图:

Reply Favorite View the author
All Replies
callcz
deepin
2021-05-21 21:58
#1

这个插件挺好玩的

Reply View the author
剥壳白煮蛋
deepin
2021-05-22 06:15
#2

好东西, 不过我想不出使用场景, 23333

Reply View the author
septemberhx
deepin
2021-05-22 07:22
#3
剥壳白煮蛋

好东西, 不过我想不出使用场景, 23333

方便显示任何你想显示的东西,比如服务器状态,延迟,农历等等——只要你会写脚本。

Reply View the author
ashin_520
deepin
2021-11-02 20:26
#4

这个插件是干嘛用的?没搞明白

Reply View the author