Fix i3status-rust not working everywhere

This commit is contained in:
2022-06-29 03:12:25 +01:00
parent 46b6904d1e
commit da84546561

View File

@@ -1,18 +1,32 @@
{ {
config, config,
pkgs, pkgs,
lib,
hostname,
... ...
}: { }: let
filterBacklight = list:
builtins.filter (item:
!(builtins.elem item.block (
if hostname == "dingbox"
then ["backlight" "battery"]
else []
)))
list;
in {
programs.i3status-rust = { programs.i3status-rust = {
enable = true; enable = true;
bars = { bars = {
main = { main = {
theme = "dracula"; theme = "dracula";
icons = "awesome"; icons = "awesome";
blocks = [ blocks =
[
{ {
block = "time"; block = "time";
} }
]
++ lib.optionals (hostname == "pingbox") [
{ {
block = "battery"; block = "battery";
allow_missing = true; allow_missing = true;
@@ -24,6 +38,8 @@
step_width = 10; step_width = 10;
invert_icons = true; invert_icons = true;
} }
]
++ [
{ {
block = "networkmanager"; block = "networkmanager";
primary_only = true; primary_only = true;