summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2017-01-09 20:59:55 +0100
committerDave Andreoli <dave@gurumeditation.it>2017-01-09 20:59:55 +0100
commit2cee30b0bc1ac04c724a070ce85154224e92608a (patch)
treef3ec079ee2f665b7fca8c1e9c012879b28a290ff /data
parent24b277a040cb0aa0951e3be05d2a9bb97b9c432d (diff)
cpu + mem gadget: implemented vertical layouts
Diffstat (limited to 'data')
-rw-r--r--data/elementary/themes/Makefile.am6
-rw-r--r--data/elementary/themes/edc/cpumonitor.edc89
-rw-r--r--data/elementary/themes/edc/memusage.edc110
-rw-r--r--data/elementary/themes/img/cpu_bar_vert.pngbin0 -> 582 bytes
-rw-r--r--data/elementary/themes/img/cpu_green_on_vert.pngbin0 -> 259 bytes
-rw-r--r--data/elementary/themes/img/cpu_red_on_vert.pngbin0 -> 248 bytes
-rw-r--r--data/elementary/themes/img/cpu_yellow_on_vert.pngbin0 -> 257 bytes
-rw-r--r--data/elementary/themes/img/mem_bar_vert.pngbin0 -> 274 bytes
-rw-r--r--data/elementary/themes/img/mem_on_vert.pngbin0 -> 293 bytes
9 files changed, 202 insertions, 3 deletions
diff --git a/data/elementary/themes/Makefile.am b/data/elementary/themes/Makefile.am
index 6a06b29..81d7d5a 100644
--- a/data/elementary/themes/Makefile.am
+++ b/data/elementary/themes/Makefile.am
@@ -225,6 +225,10 @@ elementary/themes/img/cpu_bar.png \
225elementary/themes/img/cpu_green_on.png \ 225elementary/themes/img/cpu_green_on.png \
226elementary/themes/img/cpu_red_on.png \ 226elementary/themes/img/cpu_red_on.png \
227elementary/themes/img/cpu_yellow_on.png \ 227elementary/themes/img/cpu_yellow_on.png \
228elementary/themes/img/cpu_bar_vert.png \
229elementary/themes/img/cpu_green_on_vert.png \
230elementary/themes/img/cpu_red_on_vert.png \
231elementary/themes/img/cpu_yellow_on_vert.png \
228elementary/themes/img/darken_rounded_square_half_h.png \ 232elementary/themes/img/darken_rounded_square_half_h.png \
229elementary/themes/img/darken_rounded_square_half.png \ 233elementary/themes/img/darken_rounded_square_half.png \
230elementary/themes/img/darken_rounded_square.png \ 234elementary/themes/img/darken_rounded_square.png \
@@ -561,6 +565,8 @@ elementary/themes/img/map_scale.png \
561elementary/themes/img/media_busy_progress.png \ 565elementary/themes/img/media_busy_progress.png \
562elementary/themes/img/mem_bar.png \ 566elementary/themes/img/mem_bar.png \
563elementary/themes/img/mem_on.png \ 567elementary/themes/img/mem_on.png \
568elementary/themes/img/mem_bar_vert.png \
569elementary/themes/img/mem_on_vert.png \
564elementary/themes/img/mini_blue_glow_arrow_0.png \ 570elementary/themes/img/mini_blue_glow_arrow_0.png \
565elementary/themes/img/mini_blue_glow_arrow_1.png \ 571elementary/themes/img/mini_blue_glow_arrow_1.png \
566elementary/themes/img/mini_blue_glow_arrow_2.png \ 572elementary/themes/img/mini_blue_glow_arrow_2.png \
diff --git a/data/elementary/themes/edc/cpumonitor.edc b/data/elementary/themes/edc/cpumonitor.edc
index ebe42bb..09be6d2 100644
--- a/data/elementary/themes/edc/cpumonitor.edc
+++ b/data/elementary/themes/edc/cpumonitor.edc
@@ -86,3 +86,92 @@ group { name: "e/modules/cpumonitor/main";
86 } 86 }
87 } 87 }
88} 88}
89
90group { name: "e/modules/cpumonitor/main_vert";
91 image: "cpu_bar_vert.png" COMP;
92 image: "cpu_green_on_vert.png" COMP;
93 image: "cpu_yellow_on_vert.png" COMP;
94 image: "cpu_red_on_vert.png" COMP;
95 script {
96 public message(Msg_Type:type, id, ...) {
97 if ((type == MSG_INT_SET) && (id == 1)) {
98 new val = getarg(2);
99 if (val > (100 / 7 * 1)) set_state(PART:"led1", "on", 0.0);
100 else set_state(PART:"led1", "off", 0.0);
101 if (val > (100 / 7 * 2)) set_state(PART:"led2", "on", 0.0);
102 else set_state(PART:"led2", "off", 0.0);
103 if (val > (100 / 7 * 3)) set_state(PART:"led3", "on", 0.0);
104 else set_state(PART:"led3", "off", 0.0);
105 if (val > (100 / 7 * 4)) set_state(PART:"led4", "on", 0.0);
106 else set_state(PART:"led4", "off", 0.0);
107 if (val > (100 / 7 * 5)) set_state(PART:"led5", "on", 0.0);
108 else set_state(PART:"led5", "off", 0.0);
109 if (val > (100 / 7 * 6)) set_state(PART:"led6", "on", 0.0);
110 else set_state(PART:"led6", "off", 0.0);
111 }
112 }
113 }
114 parts {
115 part { name: "bg";
116 desc { "default";
117 aspect: (54 / 10) (54 / 10);
118 aspect_preference: BOTH;
119 image.normal: "cpu_bar_vert.png";
120 }
121 part { name: "led1";
122 desc { "default"; hid;
123 rel1.relative: (1.0 / 6 * 0) 0.0;
124 rel2.relative: (1.0 / 6 * 1) 1.0;
125 image.normal: "cpu_green_on_vert.png";
126 }
127 desc { "on"; inherit: "default"; vis; }
128 desc { "off"; inherit: "default"; hid; }
129 }
130 part { name: "led2";
131 desc { "default"; hid;
132 rel1.relative: (1.0 / 6 * 1) 0.0;
133 rel2.relative: (1.0 / 6 * 2) 1.0;
134 image.normal: "cpu_green_on_vert.png";
135 }
136 desc { "on"; inherit: "default"; vis; }
137 desc { "off"; inherit: "default"; hid; }
138 }
139 part { name: "led3";
140 desc { "default"; hid;
141 rel1.relative: (1.0 / 6 * 2) 0.0;
142 rel2.relative: (1.0 / 6 * 3) 1.0;
143 image.normal: "cpu_green_on_vert.png";
144 }
145 desc { "on"; inherit: "default"; vis; }
146 desc { "off"; inherit: "default"; hid; }
147 }
148 part { name: "led4";
149 desc { "default"; hid;
150 rel1.relative: (1.0 / 6 * 3) 0.0;
151 rel2.relative: (1.0 / 6 * 4) 1.0;
152 image.normal: "cpu_yellow_on_vert.png";
153 }
154 desc { "on"; inherit: "default"; vis; }
155 desc { "off"; inherit: "default"; hid; }
156 }
157 part { name: "led5";
158 desc { "default"; hid;
159 rel1.relative: (1.0 / 6 * 4) 0.0;
160 rel2.relative: (1.0 / 6 * 5) 1.0;
161 image.normal: "cpu_yellow_on_vert.png";
162 }
163 desc { "on"; inherit: "default"; vis; }
164 desc { "off"; inherit: "default"; hid; }
165 }
166 part { name: "led6";
167 desc { "default"; hid;
168 rel1.relative: (1.0 / 6 * 5) 0.0;
169 rel2.relative: (1.0 / 6 * 6) 1.0;
170 image.normal: "cpu_red_on_vert.png";
171 }
172 desc { "on"; inherit: "default"; vis; }
173 desc { "off"; inherit: "default"; hid; }
174 }
175 }
176 }
177}
diff --git a/data/elementary/themes/edc/memusage.edc b/data/elementary/themes/edc/memusage.edc
index 256beef..14642ba 100644
--- a/data/elementary/themes/edc/memusage.edc
+++ b/data/elementary/themes/edc/memusage.edc
@@ -47,7 +47,7 @@ group { name: "e/modules/memusage/main";
47 parts { 47 parts {
48 part { name: "base"; type: SPACER; 48 part { name: "base"; type: SPACER;
49 description { state: "default" 0.0; 49 description { state: "default" 0.0;
50 aspect: 0.5 1; 50 aspect: (28 / 56) (28 / 56);
51 aspect_preference: BOTH; 51 aspect_preference: BOTH;
52 } 52 }
53 } 53 }
@@ -70,7 +70,6 @@ group { name: "e/modules/memusage/main";
70 rel1.relative: 0.0 0.0; 70 rel1.relative: 0.0 0.0;
71 rel2.relative: 0.5 1.0; 71 rel2.relative: 0.5 1.0;
72 image.normal: "mem_bar.png"; 72 image.normal: "mem_bar.png";
73 aspect_preference: SOURCE;
74 } 73 }
75 LED("mem_led1", 8) 74 LED("mem_led1", 8)
76 LED("mem_led2", 7) 75 LED("mem_led2", 7)
@@ -89,7 +88,6 @@ group { name: "e/modules/memusage/main";
89 rel1.relative: 0.5 0.0; 88 rel1.relative: 0.5 0.0;
90 rel2.relative: 1.0 1.0; 89 rel2.relative: 1.0 1.0;
91 image.normal: "mem_bar.png"; 90 image.normal: "mem_bar.png";
92 aspect_preference: SOURCE;
93 } 91 }
94 LED("swp_led1", 8) 92 LED("swp_led1", 8)
95 LED("swp_led2", 7) 93 LED("swp_led2", 7)
@@ -104,3 +102,109 @@ group { name: "e/modules/memusage/main";
104 #undef LED 102 #undef LED
105 } 103 }
106} 104}
105
106group { name: "e/modules/memusage/main_vert";
107 image: "mem_bar_vert.png" COMP;
108 image: "mem_on_vert.png" COMP;
109 script {
110 public message(Msg_Type:type, id, ...) {
111 if ((type == MSG_INT_SET) && (id == 1)) {
112 // mem
113 new val = getarg(2);
114 if (val > (100 / 9 * 1)) set_state(PART:"mem_led1", "on", 0.0);
115 else set_state(PART:"mem_led1", "off", 0.0);
116 if (val > (100 / 9 * 2)) set_state(PART:"mem_led2", "on", 0.0);
117 else set_state(PART:"mem_led2", "off", 0.0);
118 if (val > (100 / 9 * 3)) set_state(PART:"mem_led3", "on", 0.0);
119 else set_state(PART:"mem_led3", "off", 0.0);
120 if (val > (100 / 9 * 4)) set_state(PART:"mem_led4", "on", 0.0);
121 else set_state(PART:"mem_led4", "off", 0.0);
122 if (val > (100 / 9 * 5)) set_state(PART:"mem_led5", "on", 0.0);
123 else set_state(PART:"mem_led5", "off", 0.0);
124 if (val > (100 / 9 * 6)) set_state(PART:"mem_led6", "on", 0.0);
125 else set_state(PART:"mem_led6", "off", 0.0);
126 if (val > (100 / 9 * 7)) set_state(PART:"mem_led7", "on", 0.0);
127 else set_state(PART:"mem_led7", "off", 0.0);
128 if (val > (100 / 9 * 8)) set_state(PART:"mem_led8", "on", 0.0);
129 else set_state(PART:"mem_led8", "off", 0.0);
130
131 // swap
132 val = getarg(3);
133 if (val > (100 / 9 * 1)) set_state(PART:"swp_led1", "on", 0.0);
134 else set_state(PART:"swp_led1", "off", 0.0);
135 if (val > (100 / 9 * 2)) set_state(PART:"swp_led2", "on", 0.0);
136 else set_state(PART:"swp_led2", "off", 0.0);
137 if (val > (100 / 9 * 3)) set_state(PART:"swp_led3", "on", 0.0);
138 else set_state(PART:"swp_led3", "off", 0.0);
139 if (val > (100 / 9 * 4)) set_state(PART:"swp_led4", "on", 0.0);
140 else set_state(PART:"swp_led4", "off", 0.0);
141 if (val > (100 / 9 * 5)) set_state(PART:"swp_led5", "on", 0.0);
142 else set_state(PART:"swp_led5", "off", 0.0);
143 if (val > (100 / 9 * 6)) set_state(PART:"swp_led6", "on", 0.0);
144 else set_state(PART:"swp_led6", "off", 0.0);
145 if (val > (100 / 9 * 7)) set_state(PART:"swp_led7", "on", 0.0);
146 else set_state(PART:"swp_led7", "off", 0.0);
147 if (val > (100 / 9 * 8)) set_state(PART:"swp_led8", "on", 0.0);
148 else set_state(PART:"swp_led8", "off", 0.0);
149 }
150 }
151 }
152 parts {
153 part { name: "base"; type: SPACER;
154 description { state: "default" 0.0;
155 aspect: (56 / 28) (56 / 28);
156 aspect_preference: BOTH;
157 }
158 }
159
160 #define LED(_name_, _pos_) \
161 part { name: _name_; \
162 desc { "default"; hid; \
163 rel1.relative: (1.0 / 8 * (_pos_ - 1)) 0.0; \
164 rel2.relative: (1.0 / 8 * _pos_) 1.0; \
165 image.normal: "mem_on_vert.png"; \
166 } \
167 desc { "on"; inherit: "default"; vis; } \
168 desc { "off"; inherit: "default"; hid; } \
169 } \
170
171 part { name: "mem";
172 desc { "default";
173 rel1.to: "base";
174 rel2.to: "base";
175 rel1.relative: 0.0 0.0;
176 rel2.relative: 1.0 0.5;
177 image.normal: "mem_bar_vert.png";
178 }
179 LED("mem_led1", 1)
180 LED("mem_led2", 2)
181 LED("mem_led3", 3)
182 LED("mem_led4", 4)
183 LED("mem_led5", 5)
184 LED("mem_led6", 6)
185 LED("mem_led7", 7)
186 LED("mem_led8", 8)
187 }
188
189 part { name: "swp";
190 desc { "default";
191 rel1.to: "base";
192 rel2.to: "base";
193 rel1.relative: 0.0 0.5;
194 rel2.relative: 1.0 1.0;
195 rel2.offset: -1 -2;
196 image.normal: "mem_bar_vert.png";
197 }
198 LED("swp_led1", 1)
199 LED("swp_led2", 2)
200 LED("swp_led3", 3)
201 LED("swp_led4", 4)
202 LED("swp_led5", 5)
203 LED("swp_led6", 6)
204 LED("swp_led7", 7)
205 LED("swp_led8", 8)
206 }
207
208 #undef LED
209 }
210}
diff --git a/data/elementary/themes/img/cpu_bar_vert.png b/data/elementary/themes/img/cpu_bar_vert.png
new file mode 100644
index 0000000..a12ac0d
--- /dev/null
+++ b/data/elementary/themes/img/cpu_bar_vert.png
Binary files differ
diff --git a/data/elementary/themes/img/cpu_green_on_vert.png b/data/elementary/themes/img/cpu_green_on_vert.png
new file mode 100644
index 0000000..421f1a1
--- /dev/null
+++ b/data/elementary/themes/img/cpu_green_on_vert.png
Binary files differ
diff --git a/data/elementary/themes/img/cpu_red_on_vert.png b/data/elementary/themes/img/cpu_red_on_vert.png
new file mode 100644
index 0000000..611549d
--- /dev/null
+++ b/data/elementary/themes/img/cpu_red_on_vert.png
Binary files differ
diff --git a/data/elementary/themes/img/cpu_yellow_on_vert.png b/data/elementary/themes/img/cpu_yellow_on_vert.png
new file mode 100644
index 0000000..de57ac4
--- /dev/null
+++ b/data/elementary/themes/img/cpu_yellow_on_vert.png
Binary files differ
diff --git a/data/elementary/themes/img/mem_bar_vert.png b/data/elementary/themes/img/mem_bar_vert.png
new file mode 100644
index 0000000..c810c89
--- /dev/null
+++ b/data/elementary/themes/img/mem_bar_vert.png
Binary files differ
diff --git a/data/elementary/themes/img/mem_on_vert.png b/data/elementary/themes/img/mem_on_vert.png
new file mode 100644
index 0000000..ea4f91a
--- /dev/null
+++ b/data/elementary/themes/img/mem_on_vert.png
Binary files differ