.edc for battery

 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
.edc:
part {
name, "battery";
type, IMAGE;
mouse_events, 0;
description {
state, "default" 0.0;
rel1 { relative, 1.0 1.0; offset, -51 -34; }
rel2 { relative, 1.0 1.0; offset, -16 -16; }
image { normal, "icon-battery-000.png"; }
}
description {
state, "1/4" 0.0;
inherit, "default" 0.0;
image { normal, "icon-battery-020.png"; }
}
description {
state, "2/4" 0.0;
inherit, "default" 0.0;
image { normal, "icon-battery-040.png"; }
}
description {
state, "3/4" 0.0;
inherit, "default" 0.0;
image { normal, "icon-battery-060.png"; }
}
description {
state, "4/4" 0.0;
inherit, "default" 0.0;
image { normal, "icon-battery-080.png"; }
}
description {
state, "full" 0.0;
inherit, "default" 0.0;
image { normal, "icon-battery-100.png"; }
}
}
....
programs {
program {
name, "set_batt_full";
signal, "set_batt_full";
script {
set_state(PART:"battery", "full", 0.0);
}
}
program {
name, "set_batt_1/4";
signal, "set_batt_1/4";
script {
set_state(PART:"battery", "1/4", 0.0);
}
}
program {
name, "set_batt_2/4";
signal, "set_batt_2/4";
script {
set_state(PART:"battery", "2/4", 0.0);
}
}
program {
name, "set_batt_3/4";
signal, "set_batt_3/4";
script {
set_state(PART:"battery", "3/4", 0.0);
}
}
program {
name, "set_batt_4/4";
signal, "set_batt_4/4";
script {
set_state(PART:"battery", "4/4", 0.0);
}
}
program {
name, "set_batt_empty";
signal, "set_batt_empty";
script {
set_state(PART:"battery", "default", 0.0);
}
}
}