Add btop theming
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
38
users/configs/btop/default.nix
Normal file
38
users/configs/btop/default.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
{ user ? throw "user argument is required", gpu ? false }: { config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
hmConfig = config.home-manager.users."${user.name}";
|
||||
in
|
||||
{
|
||||
home-manager.users."${user.name}" = {
|
||||
programs = {
|
||||
btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color_theme = "matugen";
|
||||
theme_background = false;
|
||||
presets = "";
|
||||
vim_keys = true;
|
||||
shown_boxes = "cpu mem net proc gpu0 gpu1";
|
||||
update_ms = 1000;
|
||||
proc_tree = true;
|
||||
cpu_single_graph = true;
|
||||
disks_filter = "/ /nix /persist /cache";
|
||||
};
|
||||
};
|
||||
|
||||
matugen.settings.templates.btop = {
|
||||
input_path = ./theme.theme;
|
||||
output_path = "${hmConfig.xdg.configHome}/btop/themes/matugen.theme";
|
||||
};
|
||||
};
|
||||
|
||||
theme.extraConfig = "${lib.meta.getExe (pkgs.writeShellApplication {
|
||||
name = "reload-btop";
|
||||
runtimeInputs = with pkgs; [ procps ];
|
||||
text = ''
|
||||
pkill btop -SIGUSR2
|
||||
'';
|
||||
})} &";
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user