BarSysMon: you can now select which disk mount point to monitor storage.

This commit is contained in:
ItsLemmy
2025-11-17 14:29:32 -05:00
parent ca5f5cd506
commit 2ae5aa90c9
13 changed files with 106 additions and 44 deletions
+8 -4
View File
@@ -263,6 +263,10 @@
"disk-critical-threshold": {
"label": "Storage Space (Critical)"
},
"disk-path": {
"description": "Wählen Sie den Festplatten-Mountpunkt aus, der überwacht werden soll.",
"label": "Festplattenpfad"
},
"disk-warning-threshold": {
"label": "Storage Space (Warning)"
},
@@ -789,6 +793,10 @@
"description": "Hintergrund-Transparenz der Statusleiste anpassen.",
"label": "Hintergrund-Transparenz"
},
"capsule-opacity": {
"description": "Deckkraft der Widget-Hintergründe festlegen, wenn Kapsel angezeigt wird.",
"label": "Kapsel-Deckkraft"
},
"density": {
"description": "Innenabstand der Statusleiste für kompaktes oder geräumiges Aussehen anpassen.",
"label": "Statusleistendichte"
@@ -818,10 +826,6 @@
"show-capsule": {
"description": "Widget-Hintergründe anzeigen.",
"label": "Kapsel anzeigen"
},
"capsule-opacity": {
"description": "Deckkraft der Widget-Hintergründe festlegen, wenn Kapsel angezeigt wird.",
"label": "Kapsel-Deckkraft"
}
},
"monitors": {
+8 -4
View File
@@ -263,6 +263,10 @@
"disk-critical-threshold": {
"label": "Storage Space (Critical)"
},
"disk-path": {
"description": "Select which disk mount point to monitor.",
"label": "Disk path"
},
"disk-warning-threshold": {
"label": "Storage Space (Warning)"
},
@@ -789,6 +793,10 @@
"description": "Adjust the background opacity of the bar.",
"label": "Background opacity"
},
"capsule-opacity": {
"description": "Set the opacity level for widget backgrounds when capsule is shown.",
"label": "Capsule opacity"
},
"density": {
"description": "Adjust the bar's padding for a compact or spacious look.",
"label": "Bar density"
@@ -818,10 +826,6 @@
"show-capsule": {
"description": "Show widget backgrounds.",
"label": "Show capsule"
},
"capsule-opacity": {
"description": "Set the opacity level for widget backgrounds when capsule is shown.",
"label": "Capsule opacity"
}
},
"monitors": {
+8 -4
View File
@@ -263,6 +263,10 @@
"disk-critical-threshold": {
"label": "Storage Space (Critical)"
},
"disk-path": {
"description": "Seleccione qué punto de montaje de disco desea supervisar.",
"label": "Ruta del disco"
},
"disk-warning-threshold": {
"label": "Storage Space (Warning)"
},
@@ -789,6 +793,10 @@
"description": "Ajusta la opacidad del fondo de la barra.",
"label": "Opacidad del fondo"
},
"capsule-opacity": {
"description": "Establecer el nivel de opacidad para los fondos de los widgets cuando se muestra la cápsula.",
"label": "Opacidad de la cápsula"
},
"density": {
"description": "Ajusta el relleno de la barra para un aspecto compacto o espacioso.",
"label": "Densidad de la barra"
@@ -818,10 +826,6 @@
"show-capsule": {
"description": "Mostrar fondos de los widgets.",
"label": "Mostrar cápsula"
},
"capsule-opacity": {
"description": "Establecer el nivel de opacidad para los fondos de los widgets cuando se muestra la cápsula.",
"label": "Opacidad de la cápsula"
}
},
"monitors": {
+8 -4
View File
@@ -263,6 +263,10 @@
"disk-critical-threshold": {
"label": "Storage Space (Critical)"
},
"disk-path": {
"description": "Sélectionnez le point de montage du disque à surveiller.",
"label": "Chemin du disque"
},
"disk-warning-threshold": {
"label": "Storage Space (Warning)"
},
@@ -789,6 +793,10 @@
"description": "Ajustez l'opacité de l'arrière-plan de la barre.",
"label": "Opacité de l'arrière-plan"
},
"capsule-opacity": {
"description": "Définir le niveau d'opacité des arrière-plans des widgets quand la capsule est affichée.",
"label": "Opacité de la capsule"
},
"density": {
"description": "Ajustez le remplissage de la barre pour un aspect compact ou spacieux.",
"label": "Densité de la barre"
@@ -818,10 +826,6 @@
"show-capsule": {
"description": "Afficher les arrière-plans des widgets.",
"label": "Afficher la capsule"
},
"capsule-opacity": {
"description": "Définir le niveau d'opacité des arrière-plans des widgets quand la capsule est affichée.",
"label": "Opacité de la capsule"
}
},
"monitors": {
+8 -4
View File
@@ -263,6 +263,10 @@
"disk-critical-threshold": {
"label": "Opslagruimte (Kritiek)"
},
"disk-path": {
"description": "Selecteer welk schijfkoppelpunt u wilt monitoren.",
"label": "Schijfpad"
},
"disk-warning-threshold": {
"label": "Opslagruimte (Waarschuwing)"
},
@@ -789,6 +793,10 @@
"description": "Pas de achtergronddekking van de balk aan.",
"label": "Achtergronddekking"
},
"capsule-opacity": {
"description": "Stel het doorzichtigheidsniveau in voor widget-achtergronden wanneer capsule wordt getoond.",
"label": "Capsule-doorzichtigheid"
},
"density": {
"description": "Pas de opvulling van de balk aan voor een compacte of ruime uitstraling.",
"label": "Balkdichtheid"
@@ -818,10 +826,6 @@
"show-capsule": {
"description": "Widget-achtergronden tonen.",
"label": "Capsules tonen"
},
"capsule-opacity": {
"description": "Stel het doorzichtigheidsniveau in voor widget-achtergronden wanneer capsule wordt getoond.",
"label": "Capsule-doorzichtigheid"
}
},
"monitors": {
+8 -4
View File
@@ -263,6 +263,10 @@
"disk-critical-threshold": {
"label": "Storage Space (Critical)"
},
"disk-path": {
"description": "Selecione qual ponto de montagem de disco monitorar.",
"label": "Caminho do disco"
},
"disk-warning-threshold": {
"label": "Storage Space (Warning)"
},
@@ -789,6 +793,10 @@
"description": "Ajuste a opacidade do fundo da barra.",
"label": "Opacidade do fundo"
},
"capsule-opacity": {
"description": "Define o nível de opacidade para fundos dos widgets quando a cápsula é mostrada.",
"label": "Opacidade da cápsula"
},
"density": {
"description": "Ajuste o preenchimento da barra para um visual compacto ou espaçoso.",
"label": "Densidade da barra"
@@ -818,10 +826,6 @@
"show-capsule": {
"description": "Mostra o fundo dos widgets.",
"label": "Mostrar cápsula"
},
"capsule-opacity": {
"description": "Define o nível de opacidade para fundos dos widgets quando a cápsula é mostrada.",
"label": "Opacidade da cápsula"
}
},
"monitors": {
+8 -4
View File
@@ -263,6 +263,10 @@
"disk-critical-threshold": {
"label": "Место на диске (Критично)"
},
"disk-path": {
"description": "Выберите точку монтирования диска для мониторинга.",
"label": "Путь к диску"
},
"disk-warning-threshold": {
"label": "Место на диске (Предупреждение)"
},
@@ -789,6 +793,10 @@
"description": "Настройка непрозрачности фона панели.",
"label": "Непрозрачность фона"
},
"capsule-opacity": {
"description": "Установить уровень непрозрачности для фона виджетов, когда капсула отображается.",
"label": "Непрозрачность капсулы"
},
"density": {
"description": "Настройка отступов панели для компактного или просторного вида.",
"label": "Плотность панели"
@@ -818,10 +826,6 @@
"show-capsule": {
"description": "Показывать фон виджетов.",
"label": "Показывать капсулу"
},
"capsule-opacity": {
"description": "Установить уровень непрозрачности для фона виджетов, когда капсула отображается.",
"label": "Непрозрачность капсулы"
}
},
"monitors": {
+8 -4
View File
@@ -263,6 +263,10 @@
"disk-critical-threshold": {
"label": "Depolama Alanı (Kritik)"
},
"disk-path": {
"description": "İzlenecek disk bağlama noktasını seçin.",
"label": "Disk yolu"
},
"disk-warning-threshold": {
"label": "Depolama Alanı (Uyarı)"
},
@@ -789,6 +793,10 @@
"description": "Barın arka plan opaklığını ayarlayın.",
"label": "Arka plan opaklığı"
},
"capsule-opacity": {
"description": "Kapsül gösterildiğinde widget arka planlarının saydamlık seviyesini ayarla.",
"label": "Kapsül saydamlığı"
},
"density": {
"description": "Sıkı veya geniş bir görünüm için barın dolgusunu ayarlayın.",
"label": "Bar yoğunluğu"
@@ -818,10 +826,6 @@
"show-capsule": {
"description": "Widget arka planlarını göster.",
"label": "Kapsülü göster"
},
"capsule-opacity": {
"description": "Kapsül gösterildiğinde widget arka planlarının saydamlık seviyesini ayarla.",
"label": "Kapsül saydamlığı"
}
},
"monitors": {
+8 -4
View File
@@ -263,6 +263,10 @@
"disk-critical-threshold": {
"label": "Місце на диску (Критичний)"
},
"disk-path": {
"description": "Виберіть точку монтування диска для моніторингу.",
"label": "Шлях до диска"
},
"disk-warning-threshold": {
"label": "Місце на диску (Попередження)"
},
@@ -789,6 +793,10 @@
"description": "Налаштуйте непрозорість фону панелі.",
"label": "Непрозорість фону"
},
"capsule-opacity": {
"description": "Встановити рівень непрозорості для фону віджетів, коли показано капсулу.",
"label": "Непрозорість капсули"
},
"density": {
"description": "Налаштуйте відступи панелі для компактного або просторого вигляду.",
"label": "Щільність панелі"
@@ -818,10 +826,6 @@
"show-capsule": {
"description": "Показувати фон віджетів.",
"label": "Показувати капсулу"
},
"capsule-opacity": {
"description": "Встановити рівень непрозорості для фону віджетів, коли показано капсулу.",
"label": "Непрозорість капсули"
}
},
"monitors": {
+8 -4
View File
@@ -263,6 +263,10 @@
"disk-critical-threshold": {
"label": "存储空间(严重)"
},
"disk-path": {
"description": "选择要监控的磁盘挂载点。",
"label": "磁盘路径"
},
"disk-warning-threshold": {
"label": "存储空间(警告)"
},
@@ -789,6 +793,10 @@
"description": "调整状态栏的背景不透明度。",
"label": "背景不透明度"
},
"capsule-opacity": {
"description": "设置显示胶囊时小部件背景的不透明度。",
"label": "胶囊不透明度"
},
"density": {
"description": "调整状态栏的内边距以获得紧凑或宽松的外观。",
"label": "状态栏密度"
@@ -818,10 +826,6 @@
"show-capsule": {
"description": "为每个小部件添加背景。",
"label": "显示组件背景"
},
"capsule-opacity": {
"description": "设置显示胶囊时小部件背景的不透明度。",
"label": "胶囊不透明度"
}
},
"monitors": {
+4 -3
View File
@@ -40,6 +40,7 @@ Rectangle {
readonly property bool showMemoryAsPercent: (widgetSettings.showMemoryAsPercent !== undefined) ? widgetSettings.showMemoryAsPercent : widgetMetadata.showMemoryAsPercent
readonly property bool showNetworkStats: (widgetSettings.showNetworkStats !== undefined) ? widgetSettings.showNetworkStats : widgetMetadata.showNetworkStats
readonly property bool showDiskUsage: (widgetSettings.showDiskUsage !== undefined) ? widgetSettings.showDiskUsage : widgetMetadata.showDiskUsage
readonly property string diskPath: (widgetSettings.diskPath !== undefined) ? widgetSettings.diskPath : widgetMetadata.diskPath
readonly property real iconSize: textSize * 1.4
readonly property real textSize: {
@@ -77,8 +78,8 @@ Rectangle {
readonly property bool tempCritical: showCpuTemp && SystemStatService.cpuTemp > tempCriticalThreshold
readonly property bool memWarning: showMemoryUsage && SystemStatService.memPercent > memWarningThreshold
readonly property bool memCritical: showMemoryUsage && SystemStatService.memPercent > memCriticalThreshold
readonly property bool diskWarning: showDiskUsage && SystemStatService.diskPercents["/"] > diskWarningThreshold
readonly property bool diskCritical: showDiskUsage && SystemStatService.diskPercents["/"] > diskCriticalThreshold
readonly property bool diskWarning: showDiskUsage && SystemStatService.diskPercents[diskPath] > diskWarningThreshold
readonly property bool diskCritical: showDiskUsage && SystemStatService.diskPercents[diskPath] > diskCriticalThreshold
TextMetrics {
id: percentMetrics
@@ -501,7 +502,7 @@ Rectangle {
}
NText {
text: `${SystemStatService.diskPercents["/"]}%`
text: SystemStatService.diskPercents[diskPath] ? `${SystemStatService.diskPercents[diskPath]}%` : "n/a"
family: Settings.data.ui.fontFixed
pointSize: textSize
applyUiScale: false
@@ -2,6 +2,7 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import qs.Commons
import qs.Services.System
import qs.Widgets
ColumnLayout {
@@ -20,6 +21,7 @@ ColumnLayout {
property bool valueShowMemoryAsPercent: widgetData.showMemoryAsPercent !== undefined ? widgetData.showMemoryAsPercent : widgetMetadata.showMemoryAsPercent
property bool valueShowNetworkStats: widgetData.showNetworkStats !== undefined ? widgetData.showNetworkStats : widgetMetadata.showNetworkStats
property bool valueShowDiskUsage: widgetData.showDiskUsage !== undefined ? widgetData.showDiskUsage : widgetMetadata.showDiskUsage
property string valueDiskPath: widgetData.diskPath !== undefined ? widgetData.diskPath : widgetMetadata.diskPath
function saveSettings() {
var settings = Object.assign({}, widgetData || {});
@@ -30,6 +32,7 @@ ColumnLayout {
settings.showMemoryAsPercent = valueShowMemoryAsPercent;
settings.showNetworkStats = valueShowNetworkStats;
settings.showDiskUsage = valueShowDiskUsage;
settings.diskPath = valueDiskPath;
return settings;
}
@@ -96,4 +99,21 @@ ColumnLayout {
checked: valueShowDiskUsage
onToggled: checked => valueShowDiskUsage = checked
}
NComboBox {
id: diskPathComboBox
Layout.fillWidth: true
label: I18n.tr("bar.widget-settings.system-monitor.disk-path.label")
description: I18n.tr("bar.widget-settings.system-monitor.disk-path.description")
visible: valueShowDiskUsage
model: {
const paths = Object.keys(SystemStatService.diskPercents).sort();
return paths.map(path => ({
key: path,
name: path
}));
}
currentKey: valueDiskPath
onSelected: key => valueDiskPath = key
}
}
+2 -1
View File
@@ -176,7 +176,8 @@ Singleton {
"showMemoryUsage": true,
"showMemoryAsPercent": false,
"showNetworkStats": false,
"showDiskUsage": false
"showDiskUsage": false,
"diskPath": "/"
},
"Taskbar": {
"allowUserSettings": true,