summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Houston <stephen@localhost.localdomain>2018-02-27 13:35:29 -0600
committerStephen Houston <stephen@localhost.localdomain>2018-02-27 13:35:29 -0600
commit55bc571fbda6528cb063a776bda03dc314aea43e (patch)
tree275ef92addd815a234f5f73067cc6ddca7fb8ff3
parent14b02ca5431f4b932970d2dc59f9cbafbeed9b37 (diff)
Make theme work.
-rw-r--r--theme/wireless.edc62
1 files changed, 18 insertions, 44 deletions
diff --git a/theme/wireless.edc b/theme/wireless.edc
index 7ba7910..58f21f0 100644
--- a/theme/wireless.edc
+++ b/theme/wireless.edc
@@ -1,4 +1,5 @@
1group { name: "e/gadget/wireless/ethernet"; nomouse; 1collections {
2group { name: "wireless/ethernet"; nomouse;
2 images.image: "cloud-conn.png" COMP; 3 images.image: "cloud-conn.png" COMP;
3 images.image: "eth-base.png" COMP; 4 images.image: "eth-base.png" COMP;
4 images.image: "eth-top.png" COMP; 5 images.image: "eth-top.png" COMP;
@@ -17,8 +18,6 @@ group { name: "e/gadget/wireless/ethernet"; nomouse;
17 run_program(PROGRAM:"connecting"); 18 run_program(PROGRAM:"connecting");
18 return; 19 return;
19 } 20 }
20 stop_programs_on(PART:"eth-base");
21 stop_programs_on(PART:"eth");
22 if ((state == 2)) { 21 if ((state == 2)) {
23 set_state(PART:"eth-base", "connected", 0.0); 22 set_state(PART:"eth-base", "connected", 0.0);
24 set_state(PART:"eth", "connected", 0.0); 23 set_state(PART:"eth", "connected", 0.0);
@@ -122,19 +121,19 @@ group { name: "e/gadget/wireless/ethernet"; nomouse;
122 } 121 }
123 target_group: "clips" "clip_exclam" "clip_eth"; 122 target_group: "clips" "clip_exclam" "clip_eth";
124 program { 123 program {
125 signal: "e,state,error"; source: "e"; 124 signal: "wireless,state,error"; source: "wireless";
126 action: STATE_SET "default" 0.0; 125 action: STATE_SET "default" 0.0;
127 groups: "clips"; 126 groups: "clips";
128 } 127 }
129 program { 128 program {
130 signal: "e,state,default"; source: "e"; 129 signal: "wireless,state,default"; source: "wireless";
131 action: STATE_SET "eth" 0.0; 130 action: STATE_SET "eth" 0.0;
132 groups: "clips"; 131 groups: "clips";
133 } 132 }
134 } 133 }
135} 134}
136 135
137group { name: "e/gadget/wireless/wifi"; nomouse; 136group { name: "wireless/wifi"; nomouse;
138 images.image: "cloud-conn.png" COMP; 137 images.image: "cloud-conn.png" COMP;
139 images.image: "wifi-1.png" COMP; 138 images.image: "wifi-1.png" COMP;
140 images.image: "wifi-2.png" COMP; 139 images.image: "wifi-2.png" COMP;
@@ -155,40 +154,16 @@ group { name: "e/gadget/wireless/wifi"; nomouse;
155 run_program(PROGRAM:"connecting_wifi"); 154 run_program(PROGRAM:"connecting_wifi");
156 return; 155 return;
157 } 156 }
158 stop_programs_on(PART:"wifi-base"); 157 set_state(PART:"wifi", "default", float(signl) / 100.0);
159 stop_programs_on(PART:"wifi"); 158
160 if (signl <= 14) {
161 set_state(PART:"wifi", "default", 0.0);
162 }
163 else if (signl <= 28) {
164 set_state(PART:"wifi", "default", 0.25);
165 }
166 else if (signl <= 42) {
167 set_state(PART:"wifi", "default", 0.25);
168 }
169 else if (signl <= 57) {
170 set_state(PART:"wifi", "default", 0.50);
171 }
172 else if (signl <= 71) {
173 set_state(PART:"wifi", "default", 0.50);
174 }
175 else if (signl <= 85) {
176 set_state(PART:"wifi", "default", 0.75);
177 }
178 else {
179 set_state(PART:"wifi", "default", 0.75);
180 }
181 if ((state == 2)) { 159 if ((state == 2)) {
182 set_state(PART:"wifi-base", "connected", 0.0); 160 set_state(PART:"wifi-base", "connected", 0.0);
183 set_state(PART:"wifi", "default", 1.0);
184 } 161 }
185 else if ((state == 3)) { 162 else if ((state == 3)) {
186 set_state(PART:"wifi-base", "online", 0.0); 163 set_state(PART:"wifi-base", "online", 0.0);
187 set_state(PART:"wifi", "default", 1.0);
188 } 164 }
189 else { 165 else {
190 set_state(PART:"wifi-base", "default", 0.0); 166 set_state(PART:"wifi-base", "default", 0.0);
191 set_state(PART:"wifi", "default", 0.0);
192 } 167 }
193 } 168 }
194 } 169 }
@@ -277,8 +252,6 @@ group { name: "e/gadget/wireless/wifi"; nomouse;
277 } 252 }
278 programs { 253 programs {
279 program { "connecting_wifi"; 254 program { "connecting_wifi";
280 action: STATE_SET "default";
281 targets: "wifi";
282 sequence { 255 sequence {
283 action: STATE_SET "default" 0.0; 256 action: STATE_SET "default" 0.0;
284 target: "wifi"; 257 target: "wifi";
@@ -299,11 +272,11 @@ group { name: "e/gadget/wireless/wifi"; nomouse;
299 } 272 }
300 } 273 }
301 program { "connecting"; 274 program { "connecting";
302 action: STATE_SET "connected"; 275 action: STATE_SET "connected" 0.0;
303 target: "wifi-base"; 276 target: "wifi-base";
304 in: 0.3 0.0; 277 in: 0.3 0.0;
305 sequence { 278 sequence {
306 action: STATE_SET "default"; 279 action: STATE_SET "default" 0.0;
307 target: "wifi-base"; 280 target: "wifi-base";
308 in: 0.3 0.0; 281 in: 0.3 0.0;
309 after: "connecting"; 282 after: "connecting";
@@ -311,19 +284,19 @@ group { name: "e/gadget/wireless/wifi"; nomouse;
311 } 284 }
312 target_group: "clips" "clip_exclam" "clip_wifi"; 285 target_group: "clips" "clip_exclam" "clip_wifi";
313 program { 286 program {
314 signal: "e,state,error"; source: "e"; 287 signal: "wireless,state,error"; source: "wireless";
315 action: STATE_SET "default" 0.0; 288 action: STATE_SET "default" 0.0;
316 groups: "clips"; 289 groups: "clips";
317 } 290 }
318 program { 291 program {
319 signal: "e,state,default"; source: "e"; 292 signal: "wireless,state,default"; source: "wireless";
320 action: STATE_SET "wifi" 0.0; 293 action: STATE_SET "wifi" 0.0;
321 groups: "clips"; 294 groups: "clips";
322 } 295 }
323 } 296 }
324} 297}
325 298
326group { name: "e/gadget/wireless/bluetooth"; nomouse; 299group { name: "wireless/bluetooth"; nomouse;
327 images.image: "cloud-conn.png" COMP; 300 images.image: "cloud-conn.png" COMP;
328 images.image: "bt_base.png" COMP; 301 images.image: "bt_base.png" COMP;
329 images.image: "bt_sig_1.png" COMP; 302 images.image: "bt_sig_1.png" COMP;
@@ -436,13 +409,13 @@ group { name: "e/gadget/wireless/bluetooth"; nomouse;
436 } 409 }
437 programs { 410 programs {
438 program { 411 program {
439 signal: "e,state,error"; source: "e"; 412 signal: "wireless,state,error"; source: "wireless";
440 action: STATE_SET "default" 0.0; 413 action: STATE_SET "default" 0.0;
441 target: "clip_exclam"; 414 target: "clip_exclam";
442 target: "clip_bt"; 415 target: "clip_bt";
443 } 416 }
444 program { 417 program {
445 signal: "e,state,default"; source: "e"; 418 signal: "wireless,state,default"; source: "wireless";
446 action: STATE_SET "bt" 0.0; 419 action: STATE_SET "bt" 0.0;
447 target: "clip_exclam"; 420 target: "clip_exclam";
448 target: "clip_bt"; 421 target: "clip_bt";
@@ -450,7 +423,7 @@ group { name: "e/gadget/wireless/bluetooth"; nomouse;
450 } 423 }
451} 424}
452 425
453group { name: "e/gadget/wireless/cellular"; 426group { name: "wireless/cellular";
454 images.image: "cloud-conn.png" COMP; 427 images.image: "cloud-conn.png" COMP;
455 images.image: "cell_base.png" COMP; 428 images.image: "cell_base.png" COMP;
456 images.image: "cell_sig_1.png" COMP; 429 images.image: "cell_sig_1.png" COMP;
@@ -637,16 +610,17 @@ group { name: "e/gadget/wireless/cellular";
637 610
638 programs { 611 programs {
639 program { 612 program {
640 signal: "e,state,error"; source: "e"; 613 signal: "wireless,state,error"; source: "wireless";
641 action: STATE_SET "default" 0.0; 614 action: STATE_SET "default" 0.0;
642 target: "clip_exclam"; 615 target: "clip_exclam";
643 target: "clip_cell"; 616 target: "clip_cell";
644 } 617 }
645 program { 618 program {
646 signal: "e,state,default"; source: "e"; 619 signal: "wireless,state,default"; source: "wireless";
647 action: STATE_SET "cell" 0.0; 620 action: STATE_SET "cell" 0.0;
648 target: "clip_exclam"; 621 target: "clip_exclam";
649 target: "clip_cell"; 622 target: "clip_cell";
650 } 623 }
651 } 624 }
652} 625}
626}