4 个版本 (2 个稳定版)
1.0.1 | 2021 年 5 月 8 日 |
---|---|
1.0.0 | 2021 年 4 月 27 日 |
0.1.1 | 2021 年 4 月 27 日 |
0.1.0 | 2021 年 4 月 26 日 |
#168 in 可视化
33KB
823 行
▄ ▄ (._. )
█ ▄ █ █▀█ █▀▄█ █ █ █ █
█▀ ▀█ █▄█ █ █ █▀▄ █
Conkys weird terminal cousin
通过读取脚本或程序的 stdout 来监控和显示各种内容。查看 example.toml 开始使用!
安装
cargo install wonky
用法
# default config
wonky
# specified config
wonky [config_name]
目前有 3 种组件类型,指示器、仪表和分隔符。
仪表
基本用法
[[widgets]]
# Type of widget
type = "Meter"
title = "I rate"
# Unit of messurement
unit = " m8"
## Theme: (optional) ##
# meter character:
theme.meter = "="
# meter background character:
theme.meter_bg = "-"
# starting character
theme.start = "["
# ending character
theme.end = "]"
# results in: [====---]
# theme colors (ansii 0-255 [link](https://jonasjacek.github.io/colors/))
theme.fg = 10
# to have a clear background simply leave theme.bg out of the element
theme.bg = 2
# Text to the left of the bar
# prefix = "something"
# Display reading and title above the bar
# either of these will cause the meter to
# take up two vertical spaces.
reading = true
# Hide the meter
meter = true
max_command = ["echo", "8"]
value_command = ["echo", "8"]
# How often component should be updated in seconds
frequency = 60
# Horizontal alignment
right = false
# Vertical alignment
bottom = false
Bash 脚本
[[widgets]]
type = "Meter"
title = ""
unit = "c"
theme = 1
prefix = "cputemp"
reading = true
meter = true
max_command = ["bash", "~/scripts/cputemp", "max"]
value_command = ["bash", "~/scripts/cputemp"]
frequency = 60
right = false
bottom = false
指示器
基本用法
[[widgets]]
type = "Indicator"
title = " Server is running "
# Indicator output is parsed with comma-separation:
# [foreground-color],[background-color],[string]
command = ["echo", "100,88, Alert! Alert! D:"]
frequency = 1
right = false
bottom = false
分隔符
基本用法
[[widgets]]
type = "Separator"
title = "Sysinfo:"
## Theme: (optional) ##
theme.fg = 2
theme.bg = 0
right = true
bottom = true
依赖项
~3.5–5MB
~91K SLoC