summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2017-01-29 14:51:57 +0100
committerDave Andreoli <dave@gurumeditation.it>2017-01-29 14:52:12 +0100
commit07b6699293402491b53d150adc2727ffc88ca906 (patch)
treef417f527dbef2568aa31aa34ee006d5351a829ac /data
parent694c16ab2bfbb67f535e3475d358fdb41ddf8be1 (diff)
mem gadget: document all the values received in the edje message
So that themers are aware of the unused fields
Diffstat (limited to 'data')
-rw-r--r--data/elementary/themes/edc/memusage.edc16
1 files changed, 12 insertions, 4 deletions
diff --git a/data/elementary/themes/edc/memusage.edc b/data/elementary/themes/edc/memusage.edc
index 14642ba..5e4bcb6 100644
--- a/data/elementary/themes/edc/memusage.edc
+++ b/data/elementary/themes/edc/memusage.edc
@@ -4,8 +4,8 @@ group { name: "e/modules/memusage/main";
4 script { 4 script {
5 public message(Msg_Type:type, id, ...) { 5 public message(Msg_Type:type, id, ...) {
6 if ((type == MSG_INT_SET) && (id == 1)) { 6 if ((type == MSG_INT_SET) && (id == 1)) {
7 // mem 7
8 new val = getarg(2); 8 new val = getarg(2); // mem usage (percentage)
9 if (val > (100 / 9 * 1)) set_state(PART:"mem_led1", "on", 0.0); 9 if (val > (100 / 9 * 1)) set_state(PART:"mem_led1", "on", 0.0);
10 else set_state(PART:"mem_led1", "off", 0.0); 10 else set_state(PART:"mem_led1", "off", 0.0);
11 if (val > (100 / 9 * 2)) set_state(PART:"mem_led2", "on", 0.0); 11 if (val > (100 / 9 * 2)) set_state(PART:"mem_led2", "on", 0.0);
@@ -23,8 +23,7 @@ group { name: "e/modules/memusage/main";
23 if (val > (100 / 9 * 8)) set_state(PART:"mem_led8", "on", 0.0); 23 if (val > (100 / 9 * 8)) set_state(PART:"mem_led8", "on", 0.0);
24 else set_state(PART:"mem_led8", "off", 0.0); 24 else set_state(PART:"mem_led8", "off", 0.0);
25 25
26 // swap 26 val = getarg(3); // swap usage (percentage)
27 val = getarg(3);
28 if (val > (100 / 9 * 1)) set_state(PART:"swp_led1", "on", 0.0); 27 if (val > (100 / 9 * 1)) set_state(PART:"swp_led1", "on", 0.0);
29 else set_state(PART:"swp_led1", "off", 0.0); 28 else set_state(PART:"swp_led1", "off", 0.0);
30 if (val > (100 / 9 * 2)) set_state(PART:"swp_led2", "on", 0.0); 29 if (val > (100 / 9 * 2)) set_state(PART:"swp_led2", "on", 0.0);
@@ -41,6 +40,15 @@ group { name: "e/modules/memusage/main";
41 else set_state(PART:"swp_led7", "off", 0.0); 40 else set_state(PART:"swp_led7", "off", 0.0);
42 if (val > (100 / 9 * 8)) set_state(PART:"swp_led8", "on", 0.0); 41 if (val > (100 / 9 * 8)) set_state(PART:"swp_led8", "on", 0.0);
43 else set_state(PART:"swp_led8", "off", 0.0); 42 else set_state(PART:"swp_led8", "off", 0.0);
43
44 // other values received but not used in the default theme:
45 // val = getarg(4); // mem_total (kb)
46 // val = getarg(5); // mem_used (kb)
47 // val = getarg(6); // mem_cached (kb)
48 // val = getarg(7); // mem_buffers (kb)
49 // val = getarg(8); // mem_shared (kb)
50 // val = getarg(9); // swp_total (kb)
51 // val = getarg(10); // swp_used (kb)
44 } 52 }
45 } 53 }
46 } 54 }