Skip to content

Commit 39552a5

Browse files
Merge pull request #6 from thompsonnoahe/charting
Update default settings for actions
2 parents 1317f1d + 1779704 commit 39552a5

File tree

18 files changed

+1384
-372
lines changed

18 files changed

+1384
-372
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ node_modules/
77

88
.idea/
99
build
10-
debug.log
10+
debug.log
11+
12+
bin

.vscode/settings.json

Lines changed: 92 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,93 @@
11
{
2-
/* JSON schemas */
3-
"json.schemas": [
4-
{
5-
"fileMatch": [
6-
"**/manifest.json"
7-
],
8-
"url": "https://schemas.elgato.com/streamdeck/plugins/manifest.json"
9-
},
10-
{
11-
"fileMatch": [
12-
"**/layouts/*.json"
13-
],
14-
"url": "https://schemas.elgato.com/streamdeck/plugins/layout.json"
15-
}
16-
],
17-
"files.associations": {
18-
"vector": "cpp",
19-
"memory": "cpp",
20-
"xstring": "cpp",
21-
"algorithm": "cpp",
22-
"array": "cpp",
23-
"atomic": "cpp",
24-
"bit": "cpp",
25-
"cctype": "cpp",
26-
"charconv": "cpp",
27-
"chrono": "cpp",
28-
"clocale": "cpp",
29-
"cmath": "cpp",
30-
"codecvt": "cpp",
31-
"compare": "cpp",
32-
"concepts": "cpp",
33-
"coroutine": "cpp",
34-
"cstdarg": "cpp",
35-
"cstddef": "cpp",
36-
"cstdint": "cpp",
37-
"cstdio": "cpp",
38-
"cstdlib": "cpp",
39-
"cstring": "cpp",
40-
"ctime": "cpp",
41-
"cwchar": "cpp",
42-
"deque": "cpp",
43-
"exception": "cpp",
44-
"format": "cpp",
45-
"forward_list": "cpp",
46-
"fstream": "cpp",
47-
"functional": "cpp",
48-
"initializer_list": "cpp",
49-
"iomanip": "cpp",
50-
"ios": "cpp",
51-
"iosfwd": "cpp",
52-
"iostream": "cpp",
53-
"istream": "cpp",
54-
"iterator": "cpp",
55-
"limits": "cpp",
56-
"list": "cpp",
57-
"locale": "cpp",
58-
"map": "cpp",
59-
"mutex": "cpp",
60-
"new": "cpp",
61-
"optional": "cpp",
62-
"ostream": "cpp",
63-
"queue": "cpp",
64-
"ratio": "cpp",
65-
"sstream": "cpp",
66-
"stdexcept": "cpp",
67-
"stop_token": "cpp",
68-
"streambuf": "cpp",
69-
"string": "cpp",
70-
"system_error": "cpp",
71-
"thread": "cpp",
72-
"tuple": "cpp",
73-
"type_traits": "cpp",
74-
"typeinfo": "cpp",
75-
"unordered_map": "cpp",
76-
"unordered_set": "cpp",
77-
"utility": "cpp",
78-
"xfacet": "cpp",
79-
"xhash": "cpp",
80-
"xiosbase": "cpp",
81-
"xlocale": "cpp",
82-
"xlocbuf": "cpp",
83-
"xlocinfo": "cpp",
84-
"xlocmes": "cpp",
85-
"xlocmon": "cpp",
86-
"xlocnum": "cpp",
87-
"xloctime": "cpp",
88-
"xmemory": "cpp",
89-
"xtr1common": "cpp",
90-
"xtree": "cpp",
91-
"xutility": "cpp",
92-
"*.rh": "cpp",
93-
"__config": "cpp",
94-
"version": "cpp",
95-
"*.api_description": "cpp"
96-
}
97-
}
2+
/* JSON schemas */
3+
"json.schemas": [
4+
{
5+
"fileMatch": ["**/manifest.json"],
6+
"url": "https://schemas.elgato.com/streamdeck/plugins/manifest.json"
7+
},
8+
{
9+
"fileMatch": ["**/layouts/*.json"],
10+
"url": "https://schemas.elgato.com/streamdeck/plugins/layout.json"
11+
}
12+
],
13+
"files.associations": {
14+
"vector": "cpp",
15+
"memory": "cpp",
16+
"xstring": "cpp",
17+
"algorithm": "cpp",
18+
"array": "cpp",
19+
"atomic": "cpp",
20+
"bit": "cpp",
21+
"cctype": "cpp",
22+
"charconv": "cpp",
23+
"chrono": "cpp",
24+
"clocale": "cpp",
25+
"cmath": "cpp",
26+
"codecvt": "cpp",
27+
"compare": "cpp",
28+
"concepts": "cpp",
29+
"coroutine": "cpp",
30+
"cstdarg": "cpp",
31+
"cstddef": "cpp",
32+
"cstdint": "cpp",
33+
"cstdio": "cpp",
34+
"cstdlib": "cpp",
35+
"cstring": "cpp",
36+
"ctime": "cpp",
37+
"cwchar": "cpp",
38+
"deque": "cpp",
39+
"exception": "cpp",
40+
"format": "cpp",
41+
"forward_list": "cpp",
42+
"fstream": "cpp",
43+
"functional": "cpp",
44+
"initializer_list": "cpp",
45+
"iomanip": "cpp",
46+
"ios": "cpp",
47+
"iosfwd": "cpp",
48+
"iostream": "cpp",
49+
"istream": "cpp",
50+
"iterator": "cpp",
51+
"limits": "cpp",
52+
"list": "cpp",
53+
"locale": "cpp",
54+
"map": "cpp",
55+
"mutex": "cpp",
56+
"new": "cpp",
57+
"optional": "cpp",
58+
"ostream": "cpp",
59+
"queue": "cpp",
60+
"ratio": "cpp",
61+
"sstream": "cpp",
62+
"stdexcept": "cpp",
63+
"stop_token": "cpp",
64+
"streambuf": "cpp",
65+
"string": "cpp",
66+
"system_error": "cpp",
67+
"thread": "cpp",
68+
"tuple": "cpp",
69+
"type_traits": "cpp",
70+
"typeinfo": "cpp",
71+
"unordered_map": "cpp",
72+
"unordered_set": "cpp",
73+
"utility": "cpp",
74+
"xfacet": "cpp",
75+
"xhash": "cpp",
76+
"xiosbase": "cpp",
77+
"xlocale": "cpp",
78+
"xlocbuf": "cpp",
79+
"xlocinfo": "cpp",
80+
"xlocmes": "cpp",
81+
"xlocmon": "cpp",
82+
"xlocnum": "cpp",
83+
"xloctime": "cpp",
84+
"xmemory": "cpp",
85+
"xtr1common": "cpp",
86+
"xtree": "cpp",
87+
"xutility": "cpp",
88+
"*.rh": "cpp",
89+
"__config": "cpp",
90+
"version": "cpp",
91+
"*.api_description": "cpp"
92+
}
93+
}

com.nthompson.gpu.sdPlugin/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Name": "GPU Metrics",
3-
"Version": "2.0.0.0",
3+
"Version": "2.1.0.0",
44
"Author": "Noah Thompson",
55
"Actions": [
66
{

com.nthompson.gpu.sdPlugin/ui/gpu-mem.html

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
33
<head lang="en">
44
<title>GPU Metrics</title>
@@ -16,22 +16,40 @@
1616
>
1717
</sdpi-select>
1818
</sdpi-item>
19-
20-
<sdpi-item label="Show as %">
21-
<sdpi-radio
22-
id="temp"
23-
label="Show as %"
24-
placeholder="Select..."
19+
<sdpi-item>
20+
<sdpi-checkbox
21+
id="percentageControl"
2522
setting="showAsPercentage"
26-
>
27-
<option value="true">Yes</option>
28-
<option value="false">No</option>
29-
</sdpi-radio>
23+
label="Show as percentage"
24+
></sdpi-checkbox>
25+
</sdpi-item>
26+
<sdpi-item>
27+
<sdpi-checkbox
28+
id="chartCheckbox"
29+
setting="enableChart"
30+
label="Enable chart"
31+
></sdpi-checkbox>
32+
</sdpi-item>
33+
<sdpi-item label="Chart Color">
34+
<sdpi-color
35+
default="#aaaaaa"
36+
class="control"
37+
setting="chartColor"
38+
></sdpi-color>
3039
</sdpi-item>
3140

3241
<script>
3342
const { streamDeckClient } = SDPIComponents;
3443

44+
document
45+
.getElementById('chartCheckbox')
46+
.addEventListener('valuechange', e => {
47+
const controls = document.querySelectorAll('.control');
48+
controls.forEach(c => {
49+
c.disabled = !e.target.value;
50+
});
51+
});
52+
3553
streamDeckClient.sendToPropertyInspector.subscribe(e => {
3654
const devices = document.getElementById('devices');
3755

com.nthompson.gpu.sdPlugin/ui/gpu-power.html

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
33
<head lang="en">
44
<title>GPU Metrics</title>
@@ -16,9 +16,53 @@
1616
>
1717
</sdpi-select>
1818
</sdpi-item>
19+
<sdpi-item>
20+
<sdpi-checkbox
21+
id="chartCheckbox"
22+
setting="enableChart"
23+
label="Enable chart"
24+
></sdpi-checkbox>
25+
</sdpi-item>
26+
<sdpi-item label="Chart Color">
27+
<sdpi-color
28+
default="#aaaaaa"
29+
class="control"
30+
setting="chartColor"
31+
></sdpi-color>
32+
</sdpi-item>
33+
<sdpi-item label="Minimum Wattage">
34+
<sdpi-textfield
35+
class="control"
36+
setting="minWatts"
37+
pattern="^(0|[1-9][0-9]*)$"
38+
placeholder="0"
39+
maxLength="3"
40+
>
41+
</sdpi-textfield>
42+
</sdpi-item>
43+
<sdpi-item label="Maximum Wattage">
44+
<sdpi-textfield
45+
class="control"
46+
setting="maxWatts"
47+
pattern="^(0|[1-9][0-9]*)$"
48+
placeholder="300"
49+
maxLength="3"
50+
>
51+
</sdpi-textfield>
52+
</sdpi-item>
53+
1954
<script>
2055
const { streamDeckClient } = SDPIComponents;
2156

57+
const control = document
58+
.getElementById('chartCheckbox')
59+
.addEventListener('valuechange', e => {
60+
const controls = document.querySelectorAll('.control');
61+
controls.forEach(c => {
62+
c.disabled = !e.target.value;
63+
});
64+
});
65+
2266
streamDeckClient.sendToPropertyInspector.subscribe(e => {
2367
const devices = document.getElementById('devices');
2468

com.nthompson.gpu.sdPlugin/ui/gpu-temp.html

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
33
<head lang="en">
44
<title>GPU Metrics</title>
@@ -28,8 +28,51 @@
2828
<option value="fahrenheit">Fahrenheit</option>
2929
</sdpi-radio>
3030
</sdpi-item>
31+
<sdpi-item>
32+
<sdpi-checkbox
33+
id="chartCheckbox"
34+
setting="enableChart"
35+
label="Enable chart"
36+
></sdpi-checkbox>
37+
</sdpi-item>
38+
<sdpi-item label="Chart Color">
39+
<sdpi-color
40+
default="#aaaaaa"
41+
class="control"
42+
setting="chartColor"
43+
></sdpi-color>
44+
</sdpi-item>
45+
<sdpi-item label="Minimum Temperature">
46+
<sdpi-textfield
47+
class="control"
48+
setting="minTemp"
49+
pattern="^(0|[1-9][0-9]*)$"
50+
placeholder="0"
51+
maxLength="3"
52+
>
53+
</sdpi-textfield>
54+
</sdpi-item>
55+
<sdpi-item label="Maximum Temperature">
56+
<sdpi-textfield
57+
class="control"
58+
setting="maxTemp"
59+
pattern="^(0|[1-9][0-9]*)$"
60+
placeholder="100"
61+
maxLength="3"
62+
>
63+
</sdpi-textfield>
64+
</sdpi-item>
3165

3266
<script>
67+
document
68+
.getElementById('chartCheckbox')
69+
.addEventListener('valuechange', e => {
70+
const controls = document.querySelectorAll('.control');
71+
controls.forEach(c => {
72+
c.disabled = !e.target.value;
73+
});
74+
});
75+
3376
const { streamDeckClient } = SDPIComponents;
3477

3578
streamDeckClient.sendToPropertyInspector.subscribe(e => {

0 commit comments

Comments
 (0)