[user/malte] Hide empty battery, add battery stuff option

This commit is contained in:
Malte Tammena 2022-08-22 16:08:53 +02:00
parent 1b44b4713f
commit b0ba17c577
3 changed files with 7 additions and 1 deletions

View file

@ -21,6 +21,7 @@
settings.minimalGnome.enable = true;
settings.printing.enable = true;
settings.batteryStuff.enable = true;
# Pipewire for my wayland
sound.enable = false;

View file

@ -34,6 +34,7 @@ in {
minimalGnome.enable = mkEnableOption "basic gnome stuff";
printing.enable = mkEnableOption "the printing/printers configuration";
ssh.openOutsideVPN = mkEnableOption "an additional ssh port outside the VPN";
batteryStuff.enable = mkEnableOption "battery-related things";
};
config = {

View file

@ -2,6 +2,7 @@
pkgs,
lib,
config,
nixosConfig,
...
}: let
mkBorder = hex: ((config.myLib.mkColor hex).darker 0.4).hashRgb;
@ -113,7 +114,10 @@ in {
modules-left = ["sway/workspaces" "sway/mode" "sway/window"];
modules-center = ["clock#time" "custom/check-system" "clock#date"];
modules-right = ["custom/do-not-disturb" "custom/taskwarrior" "custom/new-mail" "network" "battery" "tray"];
modules-right =
["custom/do-not-disturb" "custom/taskwarrior" "custom/new-mail" "network"]
++ (lib.optional nixosConfig.settings.batteryStuff.enable "battery")
++ ["tray"];
modules = {
"sway/workspaces" = {