Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions MMM-SystemInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Module.register("MMM-SystemInfo", {
defaults: {
tableClass: 'small',
/* wifi */
showqr: true,
qrSize: 125,
network: 'network',
password: 'pass',
Expand All @@ -19,9 +20,9 @@ Module.register("MMM-SystemInfo", {
showRamUsage: false,
ramUsageCommand: 'free | awk \'/Mem:/ { printf("%.1f\\n", (($3 + $5) / $2) * 100) }\'',
showDiskUsage: false,
diskUsageCommand: "",
diskUsageCommand: "df --output=pcent / | tail -n 1 | tr -d '% '",
showCpuTemperature: false,
cpuTemperatureCommand: "echo \"$(( ($(cat /sys/class/thermal/thermal_zone1/temp) + $(cat /sys/class/thermal/thermal_zone2/temp)) / 2 ))\"",
cpuTemperatureCommand: "cat /sys/class/thermal/thermal_zone0/temp",
showInternet: true,
showPrivateIp: true,
showVolume: false,
Expand All @@ -41,25 +42,28 @@ Module.register("MMM-SystemInfo", {
getTranslations() {
return {
en: "translations/en.json",
es: "translations/es.json"
es: "translations/es.json",
tr: "translations/tr.json"
};
},

// Override dom generator.
getDom: function () {
this.root = document.createElement("div");
const wifiDiv = this.createWifiDiv();
const systemDiv = this.createSystemDiv();
this.root.classList.add(
'SI-container',
this.config.tableClass,
'layout-' + this.config.layout
);

wifiDiv.classList.add('SI-wifi');

if (this.config.showqr) {
const wifiDiv = this.createWifiDiv();
wifiDiv.classList.add('SI-wifi');
this.root.appendChild(wifiDiv);
}

systemDiv.classList.add('SI-system-info');

this.root.appendChild(wifiDiv);
this.root.appendChild(systemDiv);

return this.root;
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Full example

`cd ~/MagicMirror/modules`

2. Clone this repository `git clone https://github.com/dientuki/MMM-SystemInfo.git`
2. Clone this repository `git clone https://github.com/erdemarslan/MMM-SystemInfo.git`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change shouldn't be in this PR.


3. Make changes to your `config.js` file.

Expand Down
1 change: 1 addition & 0 deletions css/MMM-SystemInfo.css
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
.SI-system-info .value{
padding-left: 2px;
text-align: right;
min-width: 35px;
}

.SI-system-info .internet .value,
Expand Down
4 changes: 2 additions & 2 deletions node_helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ module.exports = NodeHelper.create({

switch(this.config.units) {
case "imperial":
convertedTemp = ((temperature / 1000) * 1.8 + 32).toFixed(0);
convertedTemp = ((temperature / 1000) * 1.8 + 32).toFixed(this.config.decimal);
break;
case "metric":
default:
convertedTemp = (temperature / 1000).toFixed(0);
convertedTemp = (temperature / 1000).toFixed(this.config.decimal);
}

return convertedTemp;
Expand Down
11 changes: 11 additions & 0 deletions translations/tr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"CPU_USAGE_PERCENT": "İşlemci",
"RAM_USAGE_PERCENT": "Hafıza",
"DISK_USAGE_PERCENT": "Disk",
"TEMPERATURE": "Sıcaklık",
"INTERNET": "İnternet",
"NETWORK": "Ağ",
"PASSWORD": "Şifre",
"AUTHENTICATION": "Yetkilendirme",
"VOLUME": "Ses Düzeyi"
}