gobatmon
v0.4.0
Gobatmon是一個簡單的電池級別監視Linux系統的守護程序。
它一直關注筆記本電腦中電池電量的當前充電水平,並觸發桌面通知,以警告您是否電池電量很低。
Gobatmon在節省CPU週期並因此壽命的資源上是超低的。
系統要求:
swaync , dunst等)如果您使用的是桌面環境(XFCE/GNOME/等離子體等),則很可能不需要此軟件。
Gobatmon使用DBU來派遣桌面通知。
Gobatmon的行為是使用CommandLine參數完全配置的。
只需通過執行gobatmon來運行它。 Gobatmon將連續運行。
可以配置以下選項:
gobatmon [OPTIONS]
Options:
--normal-warning-threshold uint
Threshold percentage below which a normal low battery warning is triggered (default 20)
--critical-warning-threshold uint
Threshold percentage below which a critical low battery warning is triggered (default 10)
--normal-warning-reminder-timeout uint
Timeout in seconds after which a normal low battery warning is repeated (default 600)
--critical-warning-reminder-timeout uint
Timeout in seconds after which a critical low battery warning is repeated (default 300)
--disable-icons (default false)
Do not show icons in warning notifications
--normal-warning-icon-name string
Name of the icon to use for normal low battery warning notifications (default "battery-low")
--critical-warning-icon-name string
Name of the icon to use for critical low battery warning notifications (default "battery-caution")
--poll-rate uint
Poll rate for checking battery status in seconds (default 60)
--version
Show version information and exit
--help
Show help message and exit
在為電池充電或高於正常警告閾值時,Gobatmon不會顯示任何通知,並且會對電池狀態進行輪詢以查看更改。
在電池電量上運行並低於正常/關鍵警告閾值(默認情況下為20%/10%)時,Gobatmon將檢查電池狀態,並分別每10分鐘/5分鐘(默認情況下)通知您。
就是這樣。
Gobatmon在AUR中以Gobatmon提供。
?將來會添加。
從最新版本中下載預編譯的二進制( gobatmon )。或者,安裝去構建。
保存二進製文件並配置您的窗口管理器以在啟動時啟動它,通過將以下內容放入您的啟動腳本中:
/path/to/gobatmon & 構建要求:
go要在本地建造,請運行:
make build這將創建gobatmon可執行文件。
清理構建的文件,運行:
make clean在承諾main之前,請確保使用gofmt正確格式化源代碼。
提供了一個預密碼腳本,您可以使用以下命令在本地存儲庫中激活它:
ln -sr .pre-commit .git/hooks/pre-commit