mirror of
https://github.com/eoli3n/dotfiles
synced 2024-11-22 23:12:32 +01:00
added systemd module to waybar
This commit is contained in:
parent
711721fea9
commit
4a079a1c3f
@ -74,7 +74,7 @@
|
||||
|
||||
"modules-left": ["tray", "custom/spotify"],
|
||||
"modules-center": ["network#speed"],
|
||||
"modules-right": ["custom/backup", "custom/zfs-trim", "custom/zfs-scrub", "temperature", "custom/storage", "cpu", "memory" ],
|
||||
"modules-right": ["custom/systemd", "custom/backup", "custom/zfs-trim", "custom/zfs-scrub", "temperature", "custom/storage", "cpu", "memory" ],
|
||||
"custom/spotify": {
|
||||
"format": "<span foreground='#929292'></span> {}",
|
||||
"interval": 1,
|
||||
@ -102,19 +102,25 @@
|
||||
"format": "<span foreground='#ff5c57'></span> trimming...",
|
||||
"interval": 5,
|
||||
"exec": "echo a",
|
||||
"exec-if" : "systemctl is-active --quiet zfs-trim"
|
||||
"exec-if": "systemctl is-active --quiet zfs-trim"
|
||||
},
|
||||
"custom/zfs-scrub": {
|
||||
"format": "<span foreground='#ff5c57'></span> scrubbing...",
|
||||
"interval": 5,
|
||||
"exec": "echo a",
|
||||
"exec-if" : "systemctl is-active --quiet zfs-scrub"
|
||||
"exec-if": "systemctl is-active --quiet zfs-scrub"
|
||||
},
|
||||
"custom/backup": {
|
||||
"format": "<span foreground='#ff5c57'></span> backup...",
|
||||
"interval": 5,
|
||||
"exec": "echo a",
|
||||
"exec-if" : "systemctl is-active --quiet backup"
|
||||
"exec-if": "systemctl is-active --quiet backup"
|
||||
},
|
||||
"custom/systemd": {
|
||||
"format": "<span foreground='#ff5c57'> {}</span>",
|
||||
"interval": 5,
|
||||
"exec": "~/.config/waybar/modules/systemd.sh",
|
||||
"exec-if": "~/.config/waybar/modules/systemd.sh"
|
||||
},
|
||||
"cpu": {
|
||||
"interval": 3,
|
||||
|
10
roles/waybar/files/waybar/modules/systemd.sh
Executable file
10
roles/waybar/files/waybar/modules/systemd.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if ! systemctl is-system-running | grep running
|
||||
then
|
||||
echo $(systemctl is-system-running) $(systemctl list-units --failed --plain --no-legend --full | wc -l)
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
@ -54,7 +54,7 @@ window {
|
||||
color: @alert;
|
||||
}
|
||||
|
||||
#mode, #battery, #cpu, #memory, #network, #pulseaudio, #backlight, #custom-backup, #custom-pkg, #custom-storage, #custom-vpn, #custom-zfs-trim, #custom-zfs-scrub, #temperature, #clock {
|
||||
#mode, #battery, #cpu, #memory, #network, #pulseaudio, #backlight, #custom-backup, #custom-pkg, #custom-storage, #custom-vpn, #custom-zfs-trim, #custom-zfs-scrub, #custom-systemd, #temperature, #clock {
|
||||
margin: 0px 16px 0px 0px;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user