NixOS-Config/home-manager/shared/shell/zellij.nix

67 lines
1.9 KiB
Nix

{
lib,
pkgs,
inputs,
...
}: let
layout =
pkgs.writeText "default.kdl"
''
layout {
default_tab_template {
children
pane size=1 borderless=true {
plugin location="file:${inputs.zjstatus.packages.${pkgs.system}.default}/bin/zjstatus.wasm" {
format_left "{mode} #[fg=cyan,bold]{session}"
format_center "{tabs}"
format_right "{command_git_branch} {datetime}"
format_space ""
border_enabled "false"
border_char ""
border_format "#[fg=green]{char}"
border_position "top"
hide_frame_for_single_pane "true"
mode_normal "#[bg=blue] "
mode_tmux "#[bg=blue] "
tab_normal "#[fg=green] {name} "
tab_active "#[fg=red,bold,italic] {name} "
command_git_branch_command "git rev-parse --abbrev-ref HEAD"
command_git_branch_format "#[fg=blue] {stdout} "
command_git_branch_interval "10"
command_git_branch_rendermode "static"
datetime "#[fg=#green,bold] {format} "
datetime_format "%A, %d %b %Y %H:%M"
datetime_timezone "Europe/Berlin"
}
}
}
}
'';
in {
programs.zellij = {
# This autostarts zellij on zsh start
# TODO find specific settings for vscode to avoid
enable = true;
enableZshIntegration = true;
};
home.file = {
"layout" = {
source = "${layout}";
target = ".config/zellij/default.kdl";
};
};
home.file = {
"config" = {
source = ./zellij.kdl;
target = ".config/zellij/config.kdl";
};
};
}