home: tmux: display CPU in status bar

This commit is contained in:
Antoine Martin 2021-06-21 17:47:58 +02:00
parent 63db8cce42
commit a00a9fab73

View file

@ -7,20 +7,27 @@ in
enable = mkEnableOption "tmux dotfiles";
};
config.programs.tmux = lib.mkIf cfg.enable {
enable = true;
baseIndex = 1;
terminal = "screen-256color";
clock24 = true;
config = lib.mkIf cfg.enable {
programs.tmux = {
enable = true;
baseIndex = 1;
terminal = "screen-256color";
clock24 = true;
plugins = with pkgs; [
tmuxPlugins.cpu
{
plugin = tmuxPlugins.tmux-colors-solarized;
extraConfig = ''
set -g @colors-solarized 'light'
'';
}
];
plugins = with pkgs; [
{
plugin = tmuxPlugins.cpu;
extraConfig = ''
set -g status-right 'CPU: #{cpu_percentage} | %a %d-%h %H:%M '
'';
}
{
plugin = tmuxPlugins.tmux-colors-solarized;
extraConfig = ''
set -g @colors-solarized 'light'
'';
}
];
};
};
}