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

92 lines
2.7 KiB
Nix
Raw Normal View History

2024-05-02 11:21:29 +02:00
{
lib,
pkgs,
inputs,
2024-05-02 11:21:29 +02:00
...
2024-05-02 13:12:03 +02:00
}: let
config =
2024-05-02 13:19:12 +02:00
pkgs.writeText "config.kdl"
2024-05-02 13:12:03 +02:00
''
session_serialization true
theme "catppuccin-macchiato"
2024-05-02 13:12:03 +02:00
themes {
catppuccin-mocha {
bg "#585b70" // Surface2
fg "#cdd6f4"
red "#f38ba8"
green "#a6e3a1"
blue "#89b4fa"
yellow "#f9e2af"
magenta "#f5c2e7" // Pink
orange "#fab387" // Peach
cyan "#89dceb" // Sky
black "#181825" // Mantle
white "#cdd6f4"
}
catppuccin-macchiato {
bg "#5b6078" // Surface2
fg "#cad3f5"
red "#ed8796"
green "#a6da95"
blue "#8aadf4"
yellow "#eed49f"
magenta "#f5bde6" // Pink
orange "#f5a97f" // Peach
cyan "#91d7e3" // Sky
black "#1e2030" // Mantle
white "#cad3f5"
}
}
pane = {
default_tab_template {
children
pane size=1 borderless=true {
plugin location="file:${inputs.zjstatus.packages.${pkgs.system}.default}/bin/zjstatus.wasm" {
2024-05-02 13:12:03 +02:00
format_left "{mode} #[fg=cyan,bold]{session}"
format_center "{tabs}"
format_right "{command_git_branch} {datetime}"
format_space ""
2024-05-02 12:15:04 +02:00
2024-05-02 13:12:03 +02:00
border_enabled "false"
border_char ""
border_format "#[fg=green]{char}"
border_position "top"
2024-05-02 12:15:04 +02:00
2024-05-02 13:12:03 +02:00
hide_frame_for_single_pane "true"
2024-05-02 12:15:04 +02:00
2024-05-02 13:12:03 +02:00
mode_normal "#[bg=blue] "
mode_tmux "#[bg=blue] "
2024-05-02 12:15:04 +02:00
2024-05-02 13:12:03 +02:00
tab_normal "#[fg=green] {name} "
tab_active "#[fg=red,bold,italic] {name} "
2024-05-02 12:15:04 +02:00
2024-05-02 13:12:03 +02:00
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"
2024-05-02 12:15:04 +02:00
2024-05-02 13:12:03 +02:00
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;
2024-04-29 20:06:28 +02:00
};
home.file = {
"zellij" = {
2024-05-02 13:12:03 +02:00
source = "${config}/app/config.kdl";
target = ".config/zellij/config.kdl";
};
};
2024-04-29 20:06:28 +02:00
}