From c3129054a7eba625c6e870e7fe875d02d90f74eb Mon Sep 17 00:00:00 2001 From: eoli3n Date: Tue, 12 May 2020 15:10:08 +0200 Subject: [PATCH] updated zfs waybar module --- roles/waybar/files/waybar/config | 14 +++++++++++++- roles/waybar/templates/style.j2 | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/roles/waybar/files/waybar/config b/roles/waybar/files/waybar/config index 7aae00d..53409e3 100644 --- a/roles/waybar/files/waybar/config +++ b/roles/waybar/files/waybar/config @@ -73,7 +73,7 @@ "modules-left": ["tray", "custom/spotify"], "modules-center": ["network#speed"], - "modules-right": ["temperature", "custom/storage", "cpu", "memory" ], + "modules-right": ["custom/zfs-trim", "custom/zfs-scrub", "temperature", "custom/storage", "cpu", "memory" ], "custom/spotify": { "format": " {}", "interval": 1, @@ -97,6 +97,18 @@ "interval": 60, "exec": "~/.config/waybar/modules/storage.sh /" }, + "custom/zfs-trim": { + "format": " trimming...", + "interval": 5, + "exec": "true", + "exec-if" : "systemctl is-active --quiet zfs-trim" + }, + "custom/zfs-scrub": { + "format": " scrubbing...", + "interval": 5, + "exec": "true", + "exec-if" : "systemctl is-active --quiet zfs-scrub" + }, "cpu": { "interval": 3, "format": " {usage}%" diff --git a/roles/waybar/templates/style.j2 b/roles/waybar/templates/style.j2 index 6b7c371..8015287 100644 --- a/roles/waybar/templates/style.j2 +++ b/roles/waybar/templates/style.j2 @@ -54,7 +54,7 @@ window { color: @alert; } -#mode, #battery, #cpu, #memory, #network, #pulseaudio, #backlight, #custom-pkg, #custom-storage, #custom-spotify, #custom-weather, #custom-vpn, #temperature { +#mode, #battery, #cpu, #memory, #network, #pulseaudio, #backlight, #custom-pkg, #custom-storage, #custom-spotify, #custom-weather, #custom-vpn, #custrom-zfs-trim, #custom-zfs-scrub, #temperature { margin: 0px 6px 0px 10px; }