-
Notifications
You must be signed in to change notification settings - Fork 3
/
example-config.json
48 lines (46 loc) · 1.79 KB
/
example-config.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
"_comment": "Any variable starts with '_' is a comment",
"order": [
"battery", "brightness", "volume", "memory_usage", "network_interface", "load", "time", "custom"
],
"battery": {
"format":
"{has_battery:{per_battery_fmt_str:{is_full:Battery is Full}{is_charging:charging {capacity}%}{is_discharging:discharging {capacity}%}}}"
},
"memory_usage": {
"format": "<Mem> Free {MemFree}/Total {MemTotal} <Swap> Free {SwapFree}/{SwapTotal}"
},
"brightness": {
"format": "{has_multiple_backlight_devices:{backlight_device} }{brightness}"
},
"volume": {
"format": "volume: {volume}%"
},
"load": {
"format":
"1m {loadavg_1m} kthreads:{running_kthreads_cnt}/{total_kthreads_cnt} {last_created_process_pid}"
},
"network_interface": {
"format": "{is_connected:{per_interface_fmt_str:{name} {ipv4_addrs:1} {ipv6_addrs:1}}}",
"short_format": "{is_connected:{per_interface_fmt_str:{name}}}",
"update_interval": 20,
"__update_interval__": [
"Setting update_interval to 20 means it will be updated per 20sec by default",
"if cmdline arg \"--interval\" is not specified"
]
},
"custom": {
"update_callback": {
"type": "python",
"module_name": "inline_code",
"code": "import sys\ncounter = 0\ndef handler():\n global counter\n counter += 1\n\ndef get_counter():\n return counter",
"function_name": "handler"
},
"do_print_callback": {
"type": "python",
"module_name": "inline_code2",
"code": "from inline_code import get_counter\ndef handler():\n return str(get_counter())",
"function_name": "handler"
}
}
}