Skip to content

Commit

Permalink
feat: added an option to specify icon and value color in the speed wi…
Browse files Browse the repository at this point in the history
…dget (#1862)
  • Loading branch information
exelban committed Aug 12, 2024
1 parent e3fb0ae commit 0a1e4f1
Show file tree
Hide file tree
Showing 40 changed files with 205 additions and 98 deletions.
1 change: 1 addition & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ identifier_name:
- _values
- _writeTS
- LineChartHistory
- SpeedPictogramColor

line_length: 200

Expand Down
147 changes: 86 additions & 61 deletions Kit/Widgets/Speed.swift

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions Kit/types.swift
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@ internal let SpeedPictogram: [KeyValue_t] = [
KeyValue_t(key: "arrows", value: "Arrows"),
KeyValue_t(key: "chars", value: "Characters")
]
internal let SpeedPictogramColor: [KeyValue_t] = [
KeyValue_t(key: "none", value: "None"),
KeyValue_t(key: "separator", value: "separator"),
KeyValue_t(key: "default", value: "Default color"),
KeyValue_t(key: "transparent", value: "Transparent when no activity"),
KeyValue_t(key: "constant", value: "Constant color")
]

internal let BatteryAdditionals: [KeyValue_t] = [
KeyValue_t(key: "none", value: "None"),
Expand Down
4 changes: 3 additions & 1 deletion Stats/Supporting Files/ar.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
"Monospaced font" = "خط ذو تساوي المسافات";
"Reverse order" = "ترتيب عكسي";
"Chart history" = "مدة المخطط";
"Default color" = "Default";
"Transparent when no activity" = "Transparent when no activity";
"Constant color" = "Constant";

// Module Kit
"Open module settings" = "فتح إعدادات الوحدة";
Expand Down Expand Up @@ -366,7 +369,6 @@
"Nonactive state color" = "لون الحالة غير النشطة";
"Connectivity host (ICMP)" = "مضيف الاتصال (ICMP)";
"Leave empty to disable the check" = "اتركه فارغًا لتعطيل الفحص";
"Transparent pictogram when no activity" = "رمز بياني شفاف عند عدم وجود نشاط";
"Connectivity history" = "سجل الاتصال";
"Auto-refresh public IP address" = "تحديث تلقائي لعنوان IP العام";
"Every hour" = "كل ساعة";
Expand Down
4 changes: 3 additions & 1 deletion Stats/Supporting Files/bg.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
"Monospaced font" = "Monospaced font";
"Reverse order" = "Reverse order";
"Chart history" = "Chart history";
"Default color" = "Default";
"Transparent when no activity" = "Transparent when no activity";
"Constant color" = "Constant";

// Module Kit
"Open module settings" = "Отваряне на настройките на модула";
Expand Down Expand Up @@ -366,7 +369,6 @@
"Nonactive state color" = "Цвят на неактивното състояние";
"Connectivity host (ICMP)" = "Connectivity host (ICMP)";
"Leave empty to disable the check" = "Оставете празно, за да изключите проверката";
"Transparent pictogram when no activity" = "Transparent pictogram when no activity";
"Connectivity history" = "Connectivity history";
"Auto-refresh public IP address" = "Auto-refresh public IP address";
"Every hour" = "Every hour";
Expand Down
4 changes: 3 additions & 1 deletion Stats/Supporting Files/ca.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
"Monospaced font" = "Tipus de lletra monoespaiat";
"Reverse order" = "Reverse order";
"Chart history" = "Chart history";
"Default color" = "Default";
"Transparent when no activity" = "Transparent when no activity";
"Constant color" = "Constant";

// Module Kit
"Open module settings" = "Obre la configuració del mòdul";
Expand Down Expand Up @@ -366,7 +369,6 @@
"Nonactive state color" = "Nonactive state color";
"Connectivity host (ICMP)" = "Connectivity host (ICMP)";
"Leave empty to disable the check" = "Leave empty to disable the check";
"Transparent pictogram when no activity" = "Transparent pictogram when no activity";
"Connectivity history" = "Connectivity history";
"Auto-refresh public IP address" = "Auto-refresh public IP address";
"Every hour" = "Every hour";
Expand Down
4 changes: 3 additions & 1 deletion Stats/Supporting Files/cs.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
"Monospaced font" = "Monospaced font";
"Reverse order" = "Reverse order";
"Chart history" = "Chart history";
"Default color" = "Default";
"Transparent when no activity" = "Transparent when no activity";
"Constant color" = "Constant";

// Module Kit
"Open module settings" = "Otevřít nastavení modulu";
Expand Down Expand Up @@ -366,7 +369,6 @@
"Nonactive state color" = "Barva neaktivního stavu";
"Connectivity host (ICMP)" = "Hostitel připojení (ICMP)";
"Leave empty to disable the check" = "Pro vypnutí kontroly ponechte prázdné pole";
"Transparent pictogram when no activity" = "Průhledný piktogram při inaktivitě";
"Connectivity history" = "Connectivity history";
"Auto-refresh public IP address" = "Auto-refresh public IP address";
"Every hour" = "Every hour";
Expand Down
4 changes: 3 additions & 1 deletion Stats/Supporting Files/da.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
"Monospaced font" = "Monospaced skrifttype";
"Reverse order" = "Reverse order";
"Chart history" = "Chart history";
"Default color" = "Default";
"Transparent when no activity" = "Transparent when no activity";
"Constant color" = "Constant";

// Module Kit
"Open module settings" = "Åben indstillinger for moduler";
Expand Down Expand Up @@ -366,7 +369,6 @@
"Nonactive state color" = "Inaktiv farve";
"Connectivity host (ICMP)" = "Connectivity host (ICMP)";
"Leave empty to disable the check" = "Lad feltet være tom for at deaktivere tjekket";
"Transparent pictogram when no activity" = "Gennemsigtigt pictogram ved inaktivitet";
"Connectivity history" = "Forbindelseshistorik";
"Auto-refresh public IP address" = "Automatisk opdatering af offentlig IP adresse";
"Every hour" = "Hver time";
Expand Down
4 changes: 3 additions & 1 deletion Stats/Supporting Files/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
"Monospaced font" = "Monospace-Schrift";
"Reverse order" = "Reihenfolge umkehren";
"Chart history" = "Diagramm-Zeitfenster";
"Default color" = "Default";
"Transparent when no activity" = "Transparent when no activity";
"Constant color" = "Constant";

// Module Kit
"Open module settings" = "Modul Einstellungen öffnen";
Expand Down Expand Up @@ -366,7 +369,6 @@
"Nonactive state color" = "Inaktiver-Status Farbe";
"Connectivity host (ICMP)" = "Verbindungsverfügbarkeits-Host (ICMP)";
"Leave empty to disable the check" = "Leer lassen zum Deaktivieren";
"Transparent pictogram when no activity" = "Transparentes Piktogramm ohne Aktivität";
"Connectivity history" = "Verbindungshistorie";
"Auto-refresh public IP address" = "Öffentliche IP automatisch aktualisieren";
"Every hour" = "Jede Stunde";
Expand Down
4 changes: 3 additions & 1 deletion Stats/Supporting Files/el.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
"Monospaced font" = "Μονόχωρη γραμματοσειρά";
"Reverse order" = "Reverse order";
"Chart history" = "Chart history";
"Default color" = "Default";
"Transparent when no activity" = "Transparent when no activity";
"Constant color" = "Constant";

// Module Kit
"Open module settings" = "Άνοιγμα ρυθμίσεων ενότητας";
Expand Down Expand Up @@ -366,7 +369,6 @@
"Nonactive state color" = "Nonactive state color";
"Connectivity host (ICMP)" = "Connectivity host (ICMP)";
"Leave empty to disable the check" = "Leave empty to disable the check";
"Transparent pictogram when no activity" = "Transparent pictogram when no activity";
"Connectivity history" = "Connectivity history";
"Auto-refresh public IP address" = "Auto-refresh public IP address";
"Every hour" = "Every hour";
Expand Down
4 changes: 3 additions & 1 deletion Stats/Supporting Files/en-GB.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
"Monospaced font" = "Monospaced font";
"Reverse order" = "Reverse order";
"Chart history" = "Chart history";
"Default color" = "Default";
"Transparent when no activity" = "Transparent when no activity";
"Constant color" = "Constant";

// Module Kit
"Open module settings" = "Open module settings";
Expand Down Expand Up @@ -366,7 +369,6 @@
"Nonactive state color" = "Nonactive state colour";
"Connectivity host (ICMP)" = "Connectivity host (ICMP)";
"Leave empty to disable the check" = "Leave empty to disable the check";
"Transparent pictogram when no activity" = "Transparent pictogram when no activity";
"Connectivity history" = "Connectivity history";
"Auto-refresh public IP address" = "Auto-refresh public IP address";
"Every hour" = "Every hour";
Expand Down
4 changes: 3 additions & 1 deletion Stats/Supporting Files/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
"Monospaced font" = "Monospaced font";
"Reverse order" = "Reverse order";
"Chart history" = "Chart history";
"Default color" = "Default";
"Transparent when no activity" = "Transparent when no activity";
"Constant color" = "Constant";

// Module Kit
"Open module settings" = "Open module settings";
Expand Down Expand Up @@ -366,7 +369,6 @@
"Nonactive state color" = "Nonactive state color";
"Connectivity host (ICMP)" = "Connectivity host (ICMP)";
"Leave empty to disable the check" = "Leave empty to disable the check";
"Transparent pictogram when no activity" = "Transparent pictogram when no activity";
"Connectivity history" = "Connectivity history";
"Auto-refresh public IP address" = "Auto-refresh public IP address";
"Every hour" = "Every hour";
Expand Down
4 changes: 3 additions & 1 deletion Stats/Supporting Files/es.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
"Monospaced font" = "Fuente monoespaciada";
"Reverse order" = "Orden inverso";
"Chart history" = "Chart history";
"Default color" = "Default";
"Transparent when no activity" = "Transparent when no activity";
"Constant color" = "Constant";

// Module Kit
"Open module settings" = "Abrir la configruación del módulo";
Expand Down Expand Up @@ -366,7 +369,6 @@
"Nonactive state color" = "Color de estado inactivo";
"Connectivity host (ICMP)" = "Host de conectividad (ICMP)";
"Leave empty to disable the check" = "Dejar vacío para desactivar";
"Transparent pictogram when no activity" = "Icono transparente si no hay actividad";
"Connectivity history" = "Historial de conectividad";
"Auto-refresh public IP address" = "Auto-actualizar IP pública";
"Every hour" = "Cada hora";
Expand Down
4 changes: 3 additions & 1 deletion Stats/Supporting Files/et.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
"Monospaced font" = "Üheruumiline kirjastiil";
"Reverse order" = "Reverse order";
"Chart history" = "Chart history";
"Default color" = "Default";
"Transparent when no activity" = "Transparent when no activity";
"Constant color" = "Constant";

// Module Kit
"Open module settings" = "Ava mooduli sätted";
Expand Down Expand Up @@ -366,7 +369,6 @@
"Nonactive state color" = "Mitteaktiivse oleku värv";
"Connectivity host (ICMP)" = "Ühendushost (ICMP)";
"Leave empty to disable the check" = "Tšeki keelamiseks jätke tühjaks";
"Transparent pictogram when no activity" = "Läbipaistev piktogramm, kui tegevus puudub";
"Connectivity history" = "Ühenduse ajalugu";
"Auto-refresh public IP address" = "Avaliku IP-aadressi automaatne värskendamine";
"Every hour" = "Iga tund";
Expand Down
4 changes: 3 additions & 1 deletion Stats/Supporting Files/fa.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
"Monospaced font" = "Monospaced font";
"Reverse order" = "Reverse order";
"Chart history" = "Chart history";
"Default color" = "Default";
"Transparent when no activity" = "Transparent when no activity";
"Constant color" = "Constant";

// Module Kit
"Open module settings" = "باز کردن تنظیمات ماژول‌ها";
Expand Down Expand Up @@ -366,7 +369,6 @@
"Nonactive state color" = "رنگ حالت غیر فعال";
"Connectivity host (ICMP)" = "میزبان اتصال (ICMP)";
"Leave empty to disable the check" = "خالی بگذارید تا بررسی غیرفعال شود";
"Transparent pictogram when no activity" = "Transparent pictogram when no activity";
"Connectivity history" = "Connectivity history";
"Auto-refresh public IP address" = "Auto-refresh public IP address";
"Every hour" = "Every hour";
Expand Down
4 changes: 3 additions & 1 deletion Stats/Supporting Files/fr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
"Monospaced font" = "Police à espacement fixe";
"Reverse order" = "Reverse order";
"Chart history" = "Chart history";
"Default color" = "Default";
"Transparent when no activity" = "Transparent when no activity";
"Constant color" = "Constant";

// Module Kit
"Open module settings" = "Ouvrir les paramètres du module";
Expand Down Expand Up @@ -366,7 +369,6 @@
"Nonactive state color" = "Couleur de l'état inactif";
"Connectivity host (ICMP)" = "Hôte de connectivité (ICMP)";
"Leave empty to disable the check" = "Laissez vide pour désactiver la vérification";
"Transparent pictogram when no activity" = "Pictogramme transparent en l'absence d'activité";
"Connectivity history" = "Historique de la connectivité";
"Auto-refresh public IP address" = "Actualiser automatiquement l'adresse IP publique";
"Every hour" = "Toutes les heures";
Expand Down
4 changes: 3 additions & 1 deletion Stats/Supporting Files/he.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
"Monospaced font" = "Monospaced font";
"Reverse order" = "Reverse order";
"Chart history" = "Chart history";
"Default color" = "Default";
"Transparent when no activity" = "Transparent when no activity";
"Constant color" = "Constant";

// Module Kit
"Open module settings" = "פתח/י הגדרות מודל";
Expand Down Expand Up @@ -366,7 +369,6 @@
"Nonactive state color" = "Nonactive state color";
"Connectivity host (ICMP)" = "Connectivity host (ICMP)";
"Leave empty to disable the check" = "Leave empty to disable the check";
"Transparent pictogram when no activity" = "Transparent pictogram when no activity";
"Connectivity history" = "Connectivity history";
"Auto-refresh public IP address" = "Auto-refresh public IP address";
"Every hour" = "Every hour";
Expand Down
4 changes: 3 additions & 1 deletion Stats/Supporting Files/hi.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
"Monospaced font" = "मोनोस्पेस्ड फ़ॉन्ट";
"Reverse order" = "Reverse order";
"Chart history" = "Chart history";
"Default color" = "Default";
"Transparent when no activity" = "Transparent when no activity";
"Constant color" = "Constant";

// Module Kit
"Open module settings" = "ओपन मॉड्यूल सेटिंग्स";
Expand Down Expand Up @@ -366,7 +369,6 @@
"Nonactive state color" = "नॉनएक्टिव स्टेट कलर";
"Connectivity host (ICMP)" = "कनेक्टिविटी होस्ट (आईसीएमपी)";
"Leave empty to disable the check" = "चेक को अक्षम करने के लिए खाली छोड़ दें";
"Transparent pictogram when no activity" = "पारदर्शी चित्रांकन जब कोई गतिविधि नहीं होती है";
"Connectivity history" = "कनेक्टिविटी इतिहास";
"Auto-refresh public IP address" = "ऑटो-रिफ्रेश सार्वजनिक आईपी पता";
"Every hour" = "हर घंटे";
Expand Down
4 changes: 3 additions & 1 deletion Stats/Supporting Files/hr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
"Monospaced font" = "Monospaced font";
"Reverse order" = "Reverse order";
"Chart history" = "Chart history";
"Default color" = "Default";
"Transparent when no activity" = "Transparent when no activity";
"Constant color" = "Constant";

// Module Kit
"Open module settings" = "Otvori postavke modula";
Expand Down Expand Up @@ -366,7 +369,6 @@
"Nonactive state color" = "Nonactive state color";
"Connectivity host (ICMP)" = "Connectivity host (ICMP)";
"Leave empty to disable the check" = "Leave empty to disable the check";
"Transparent pictogram when no activity" = "Transparent pictogram when no activity";
"Connectivity history" = "Connectivity history";
"Auto-refresh public IP address" = "Auto-refresh public IP address";
"Every hour" = "Every hour";
Expand Down
4 changes: 3 additions & 1 deletion Stats/Supporting Files/hu.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
"Monospaced font" = "Mono betűtípus";
"Reverse order" = "Fordított sorrend";
"Chart history" = "Chart history";
"Default color" = "Default";
"Transparent when no activity" = "Transparent when no activity";
"Constant color" = "Constant";

// Module Kit
"Open module settings" = "Modul beállításainak megnyitása";
Expand Down Expand Up @@ -366,7 +369,6 @@
"Nonactive state color" = "Inaktív állapot színe";
"Connectivity host (ICMP)" = "Kapcsolati gazdagép (ICMP)";
"Leave empty to disable the check" = "Hagyd üresen az ellenőrzés kikapcsolásához";
"Transparent pictogram when no activity" = "Átlátszó ikon, ha nincs forgalom";
"Connectivity history" = "Kapcsolati előzmények";
"Auto-refresh public IP address" = "Publikus IP cím automatikus frissítése";
"Every hour" = "Óránként";
Expand Down
4 changes: 3 additions & 1 deletion Stats/Supporting Files/id.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
"Monospaced font" = "Fon monospasi";
"Reverse order" = "Reverse order";
"Chart history" = "Chart history";
"Default color" = "Default";
"Transparent when no activity" = "Transparent when no activity";
"Constant color" = "Constant";

// Module Kit
"Open module settings" = "Buka pengaturan modul";
Expand Down Expand Up @@ -366,7 +369,6 @@
"Nonactive state color" = "Nonactive state color";
"Connectivity host (ICMP)" = "Connectivity host (ICMP)";
"Leave empty to disable the check" = "Leave empty to disable the check";
"Transparent pictogram when no activity" = "Transparent pictogram when no activity";
"Connectivity history" = "Connectivity history";
"Auto-refresh public IP address" = "Auto-refresh public IP address";
"Every hour" = "Every hour";
Expand Down
4 changes: 3 additions & 1 deletion Stats/Supporting Files/it.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
"Monospaced font" = "Font a larghezza fissa";
"Reverse order" = "Inverti ordine";
"Chart history" = "Durata grafico";
"Default color" = "Default";
"Transparent when no activity" = "Transparent when no activity";
"Constant color" = "Constant";

// Module Kit
"Open module settings" = "Apri impostazioni modulo";
Expand Down Expand Up @@ -366,7 +369,6 @@
"Nonactive state color" = "Colore disattivo";
"Connectivity host (ICMP)" = "Host (ICMP)";
"Leave empty to disable the check" = "Lascia vuoto per disattivare la verifica";
"Transparent pictogram when no activity" = "Pittogramma trasparente in assenza di attività";
"Connectivity history" = "Cronologia connettività";
"Auto-refresh public IP address" = "Aggiorna automaticamente indirizzo IP pubblico";
"Every hour" = "Ogni ora";
Expand Down
4 changes: 3 additions & 1 deletion Stats/Supporting Files/ja.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
"Monospaced font" = "等幅フォント";
"Reverse order" = "Reverse order";
"Chart history" = "Chart history";
"Default color" = "Default";
"Transparent when no activity" = "Transparent when no activity";
"Constant color" = "Constant";

// Module Kit
"Open module settings" = "このモジュールの設定を開く";
Expand Down Expand Up @@ -366,7 +369,6 @@
"Nonactive state color" = "Nonactive state color";
"Connectivity host (ICMP)" = "Connectivity host (ICMP)";
"Leave empty to disable the check" = "Leave empty to disable the check";
"Transparent pictogram when no activity" = "Transparent pictogram when no activity";
"Connectivity history" = "Connectivity history";
"Auto-refresh public IP address" = "Auto-refresh public IP address";
"Every hour" = "Every hour";
Expand Down
4 changes: 3 additions & 1 deletion Stats/Supporting Files/ko.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
"Monospaced font" = "고정폭 서체";
"Reverse order" = "Reverse order";
"Chart history" = "Chart history";
"Default color" = "Default";
"Transparent when no activity" = "Transparent when no activity";
"Constant color" = "Constant";

// Module Kit
"Open module settings" = "모듈 설정 열기";
Expand Down Expand Up @@ -366,7 +369,6 @@
"Nonactive state color" = "비활성 상태 색상";
"Connectivity host (ICMP)" = "연결성 확인 호스트 (ICMP)";
"Leave empty to disable the check" = "연결성 확인을 비활성화하려면 이 란을 비워 두세요";
"Transparent pictogram when no activity" = "활동이 없을 때 상태 아이콘 숨기기";
"Connectivity history" = "연결성 기록";
"Auto-refresh public IP address" = "공개 IP주소 자동으로 새로고침";
"Every hour" = "매 시간마다";
Expand Down
Loading

0 comments on commit 0a1e4f1

Please sign in to comment.