Add btop theming
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
home.stateVersion = "24.05";
|
||||
systemd.user.startServices = "sd-switch";
|
||||
nix.settings = config.nix.settings;
|
||||
nixpkgs.config = config.nixpkgs.config;
|
||||
}];
|
||||
};
|
||||
|
||||
|
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
|
||||
'';
|
||||
})} &";
|
||||
};
|
||||
}
|
50
users/configs/btop/theme.theme
Normal file
50
users/configs/btop/theme.theme
Normal file
@@ -0,0 +1,50 @@
|
||||
theme[main_bg]="{{colors.surface.default.hex}}"
|
||||
theme[main_fg]="{{colors.on_surface.default.hex}}"
|
||||
|
||||
theme[title]="{{colors.on_surface.default.hex}}"
|
||||
theme[hi_fg]="{{colors.primary.default.hex}}"
|
||||
|
||||
theme[selected_bg]="{{colors.primary_container.default.hex}}"
|
||||
theme[selected_fg]="{{colors.on_primary_container.default.hex}}"
|
||||
theme[inactive_fg]="{{colors.surface_variant.default.hex}}"
|
||||
|
||||
theme[graph_text]="{{colors.on_surface_variant.default.hex}}"
|
||||
theme[proc_misc]="{{colors.primary.default.hex}}"
|
||||
|
||||
theme[cpu_box]="{{colors.outline.default.hex}}"
|
||||
theme[mem_box]="{{colors.outline.default.hex}}"
|
||||
theme[net_box]="{{colors.outline.default.hex}}"
|
||||
theme[proc_box]="{{colors.outline.default.hex}}"
|
||||
theme[div_line]="{{colors.outline_variant.default.hex}}"
|
||||
|
||||
theme[temp_start]="{{colors.primary.default.hex}}"
|
||||
theme[temp_mid]=""
|
||||
theme[temp_end]="{{colors.error.default.hex}}"
|
||||
|
||||
theme[cpu_start]="{{colors.primary.default.hex}}"
|
||||
theme[cpu_mid]=""
|
||||
theme[cpu_end]="{{colors.error.default.hex}}"
|
||||
|
||||
theme[used_start]="{{colors.primary.default.hex}}"
|
||||
theme[used_mid]=""
|
||||
theme[used_end]="{{colors.secondary.default.hex}}"
|
||||
|
||||
theme[available_start]="{{colors.tertiary.default.hex}}"
|
||||
theme[available_mid]=""
|
||||
theme[available_end]="{{colors.secondary.default.hex}}"
|
||||
|
||||
theme[cached_start]="{{colors.primary.default.hex}}"
|
||||
theme[cached_mid]=""
|
||||
theme[cached_end]="{{colors.secondary.default.hex}}"
|
||||
|
||||
theme[free_start]="{{colors.tertiary.default.hex}}"
|
||||
theme[free_mid]=""
|
||||
theme[free_end]="{{colors.secondary.default.hex}}"
|
||||
|
||||
theme[download_start]="{{colors.primary.default.hex}}"
|
||||
theme[download_mid]=""
|
||||
theme[download_end]="{{colors.secondary.default.hex}}"
|
||||
|
||||
theme[upload_start]="{{colors.primary.default.hex}}"
|
||||
theme[upload_mid]=""
|
||||
theme[upload_end]="{{colors.tertiary.default.hex}}"
|
@@ -113,14 +113,14 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
programs.zsh.loginExtra = lib.mkAfter ''
|
||||
if [ -z "$WAYLAND_DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then
|
||||
hyprland &> /tmp/hyprland.log
|
||||
fi
|
||||
'';
|
||||
programs = {
|
||||
zsh.loginExtra = lib.mkAfter ''
|
||||
if [ -z "$WAYLAND_DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then
|
||||
hyprland &> /tmp/hyprland.log
|
||||
fi
|
||||
'';
|
||||
|
||||
programs.matugen.settings.templates = {
|
||||
hyprland = {
|
||||
matugen.settings.templates.hyprland = {
|
||||
input_path = ./theme.conf;
|
||||
output_path = "${hmConfig.xdg.configHome}/hypr/theme.conf";
|
||||
};
|
||||
|
@@ -5,16 +5,16 @@ let
|
||||
in
|
||||
{
|
||||
home-manager.users."${user.name}" = {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
confirm_os_window_close 0
|
||||
include theme.conf
|
||||
'';
|
||||
};
|
||||
|
||||
programs.matugen.settings.templates = {
|
||||
programs = {
|
||||
kitty = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
confirm_os_window_close 0
|
||||
include theme.conf
|
||||
'';
|
||||
};
|
||||
|
||||
matugen.settings.templates.kitty = {
|
||||
input_path = ./theme.conf;
|
||||
output_path = "${hmConfig.xdg.configHome}/kitty/theme.conf";
|
||||
};
|
||||
|
@@ -10,6 +10,7 @@ in
|
||||
(import ../configs/git { inherit user; })
|
||||
(import ../configs/neovim { inherit user; })
|
||||
(import ../configs/gpg-agent { inherit user; })
|
||||
(import ../configs/btop { inherit user; })
|
||||
];
|
||||
|
||||
sops.secrets.nick-password = {
|
||||
|
Reference in New Issue
Block a user