diff --git a/MMM-SystemInfo.js b/MMM-SystemInfo.js index 1055877..a8ec06f 100755 --- a/MMM-SystemInfo.js +++ b/MMM-SystemInfo.js @@ -5,6 +5,7 @@ Module.register("MMM-SystemInfo", { defaults: { tableClass: 'small', /* wifi */ + showqr: true, qrSize: 125, network: 'network', password: 'pass', @@ -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, @@ -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; diff --git a/README.md b/README.md index 63f56d9..c80b32a 100644 --- a/README.md +++ b/README.md @@ -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` 3. Make changes to your `config.js` file. diff --git a/css/MMM-SystemInfo.css b/css/MMM-SystemInfo.css index ca35fbd..cff79ac 100755 --- a/css/MMM-SystemInfo.css +++ b/css/MMM-SystemInfo.css @@ -76,6 +76,7 @@ .SI-system-info .value{ padding-left: 2px; text-align: right; + min-width: 35px; } .SI-system-info .internet .value, diff --git a/node_helper.js b/node_helper.js index 4b41c41..e4f8d99 100755 --- a/node_helper.js +++ b/node_helper.js @@ -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; diff --git a/translations/tr.json b/translations/tr.json new file mode 100644 index 0000000..9ca2759 --- /dev/null +++ b/translations/tr.json @@ -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" + } \ No newline at end of file