Compare commits

...

1 Commits

Author SHA1 Message Date
88ad6cd610 be.lt: show battery level in tmux
All checks were successful
flake / flake (push) Successful in 1m13s
2024-07-17 16:45:46 +01:00
4 changed files with 15 additions and 1 deletions

View File

@ -15,6 +15,7 @@
boot.loader.efi.canTouchEfiVariables = true;
custom.defaults = true;
custom.laptop = true;
## Impermanence
custom.impermanence = {

View File

@ -11,6 +11,7 @@
./hostinfo.nix
./ids.nix
./impermanence.nix
./laptop.nix
./locations.nix
./resilio.nix
./services/default.nix

View File

@ -11,7 +11,14 @@ in
config = lib.mkIf cfg.enable {
home-manager.users.jake.programs.tmux = {
enable = true;
extraConfig = lib.readFile ./.tmux.conf;
extraConfig = lib.strings.concatLines [
(lib.readFile ./.tmux.conf)
''set -g status-right "${lib.strings.optionalString config.custom.laptop "#{battery_icon} #{battery_percentage} #{battery_remain} | "}\"#{=21:pane_title}\" %H:%M %d-%b-%y"''
];
plugins = with pkgs; lib.lists.optional config.custom.laptop tmuxPlugins.battery;
};
};
}

5
modules/laptop.nix Normal file
View File

@ -0,0 +1,5 @@
{ pkgs, lib, config, ... }:
{
options.custom.laptop = lib.mkEnableOption "laptop";
}