diff options
author | Franck Cuny <franck@fcuny.net> | 2023-05-28 16:32:53 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2023-05-28 16:34:42 -0700 |
commit | 9c7344efb4e3d663d26ddb81699c6572bbcfd148 (patch) | |
tree | ac65d14fdfe611de665bff060b57881c1360f5bb /home/profiles | |
parent | font: switch to Roboto for system font and JetBrain for monospace (diff) | |
download | world-9c7344efb4e3d663d26ddb81699c6572bbcfd148.tar.gz |
tools/waybar-systemd-units: get a list of failed systemd units
Get a list of failed systemd units (both user and systems), and generate an output compatible to what waybar expects. Refer to https://github.com/Alexays/Waybar/wiki/Module:-Custom for more details about the format.
Diffstat (limited to 'home/profiles')
-rw-r--r-- | home/profiles/dev.nix | 1 | ||||
-rw-r--r-- | home/profiles/waybar.nix | 11 |
2 files changed, 11 insertions, 1 deletions
diff --git a/home/profiles/dev.nix b/home/profiles/dev.nix index c1323d6..3dc5271 100644 --- a/home/profiles/dev.nix +++ b/home/profiles/dev.nix @@ -10,6 +10,7 @@ let }); pythonEnv = pkgs.python3.withPackages (p: with p; [ black + click isort pylsp-mypy requests diff --git a/home/profiles/waybar.nix b/home/profiles/waybar.nix index a7e1ff0..4a31377 100644 --- a/home/profiles/waybar.nix +++ b/home/profiles/waybar.nix @@ -13,7 +13,7 @@ margin-right = 0; margin-bottom = 0; modules-left = [ "sway/workspaces" "sway/mode" ]; - modules-right = [ "pulseaudio" "network" "battery" "clock" "tray" ]; + modules-right = [ "custom/systemd" "pulseaudio" "network" "battery" "clock" "tray" ]; "sway/workspaces" = { format = "{name}"; disable-scroll = true; @@ -30,6 +30,12 @@ tooltip = true; tooltip-format = "{timeTo} ({capacity}%)"; }; + "custom/systemd" = { + exec = "${pkgs.tools.waybar-systemd-units}/bin/waybar-systemd-units"; + format = "failed units: {}"; + return-type = "json"; + interval = 60; + }; pulseaudio = { format = "vol:{volume}%"; format-bluetooth = "bt:{volume}%"; @@ -101,5 +107,8 @@ #pulseaudio.muted { color: #8c8f91; } + #custom-systemd.errors { + border-bottom: 2px solid #ef8773; + } ''; } |