alfrodull是一个根据计算机事件控制灯光的实用程序
alfrodull的Python项目详细描述
阿尔弗罗德尔
alfrodull是一个基于a计算机事件控制灯光的实用程序。
这些灯可以在电脑休眠时关闭,在电脑唤醒时打开。最初的用例是在显示器后面附加一个LED条,可以像显示器一样打开和关闭。但是,由于可以很容易地添加额外的事件,因此可以做更多的事情。例如,在接收到通知时闪烁指示灯,或跟踪CPU使用情况,并在超过阈值时发出警告。
目前唯一受支持的设备是来自blinksticks的设备。如果需要的话,可以再加一些,我可以找到他们。
alfrodull现在只在linux上工作,因为所有事件都使用dbus通知来响应事件。以后可能会添加对Windows的支持,但需要一些其他通知服务。
安装
pip install alfrodull
用法
只需启动alfrodull并将配置文件路径作为输入传递。
alfrodull config.yml例如,Alfrodull可以在XIIT或I3WM配置中启动。
配置
alfrodull配置了一个文件,这是指定事件、动画和颜色的地方。颜色被定义为十六进制值,例如#ff00ff
,当程序启动时将检查这些值,如果无法解析,则抛出异常。将空值传递给颜色将被解析为关闭灯光。下面是可使用的当前支持的事件和动画。
Event | Description |
---|---|
Init | After the applicationn is first run |
Shutdown | Before the computer turns off |
Sleep | Before the computer goes to sleep |
Wakeup | After the computer wakes up |
Effect | Description |
---|---|
Fade | Fades from the current color or if the color is null turn off. |
Outside In | Starts from the outside and changes light one by one to the inside. |
Inside Out | Opposite of Outside In. |
device: blinkstick events: - type: "Init" animation: type: "Fade" color: "#ffffff" - type: "Sleep" animation: type: "Inside Out" color: "#000000" - type: "Wakeup" animation: type: "Outside In" color: "#ffffff"
许可证
此项目是在mit许可下授权的-有关详细信息,请参阅LICENSE文件。