Little refactor for the shell scripts
This commit is contained in:
parent
ccf1e416cf
commit
2e0fd8c174
5 changed files with 2 additions and 2 deletions
107
home-manager/shared/shell/zellij/default.nix
Normal file
107
home-manager/shared/shell/zellij/default.nix
Normal file
|
@ -0,0 +1,107 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
layout =
|
||||
pkgs.writeText "default.kdl"
|
||||
''
|
||||
layout {
|
||||
tab {
|
||||
pane
|
||||
}
|
||||
|
||||
swap_tiled_layout name="vertical" {
|
||||
tab max_panes=5 {
|
||||
pane split_direction="vertical" {
|
||||
pane
|
||||
pane { children; }
|
||||
}
|
||||
}
|
||||
tab max_panes=8 {
|
||||
pane split_direction="vertical" {
|
||||
pane { children; }
|
||||
pane { pane; pane; pane; pane; }
|
||||
}
|
||||
}
|
||||
tab max_panes=12 {
|
||||
pane split_direction="vertical" {
|
||||
pane { children; }
|
||||
pane { pane; pane; pane; pane; }
|
||||
pane { pane; pane; pane; pane; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
swap_tiled_layout name="horizontal" {
|
||||
tab max_panes=5 {
|
||||
pane
|
||||
pane
|
||||
}
|
||||
tab max_panes=8 {
|
||||
pane {
|
||||
pane split_direction="vertical" { children; }
|
||||
pane split_direction="vertical" { pane; pane; pane; pane; }
|
||||
}
|
||||
}
|
||||
tab max_panes=12 {
|
||||
pane {
|
||||
pane split_direction="vertical" { children; }
|
||||
pane split_direction="vertical" { pane; pane; pane; pane; }
|
||||
pane split_direction="vertical" { pane; pane; pane; pane; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
default_tab_template {
|
||||
pane size=1 borderless=true {
|
||||
plugin location="file:${inputs.zjstatus.packages.${pkgs.system}.default}/bin/zjstatus.wasm" {
|
||||
format_left "#[fg=#yellow,bold] {session} {mode} {tabs}"
|
||||
format_right "#[bg=bg,fg=fg] #[bg=bg,fg=fg,bold]{datetime} #[bg=bg,fg=fg]"
|
||||
|
||||
mode_locked "#[fg=magenta,bold] {name} "
|
||||
mode_normal "#[fg=green,bold] {name} "
|
||||
mode_resize "#[fg=orange,bold] {name} "
|
||||
mode_default_to_mode "resize"
|
||||
|
||||
tab_normal "#[bg=bg,fg=fg] #[bg=bg,fg=fg,bold]{name} {sync_indicator}{fullscreen_indicator}{floating_indicator} #[bg=white,fg=cyan]"
|
||||
tab_active "#[bg=bg,fg=fg] #[bg=black,fg=yellow,bold]{name} {sync_indicator}{fullscreen_indicator}{floating_indicator} #[bg=white,fg=cyan]"
|
||||
|
||||
tab_sync_indicator " "
|
||||
tab_fullscreen_indicator "□ "
|
||||
tab_floating_indicator " "
|
||||
|
||||
datetime "#[fg=#yellow,bold] {format} "
|
||||
datetime_format "%Y-%m-%d %H:%M"
|
||||
datetime_timezone "Europe/Amsterdam"
|
||||
}
|
||||
}
|
||||
children
|
||||
pane size=2 borderless=true {
|
||||
plugin location="status-bar"
|
||||
}
|
||||
}
|
||||
}
|
||||
'';
|
||||
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/layouts/default.kdl";
|
||||
};
|
||||
};
|
||||
home.file = {
|
||||
"config" = {
|
||||
source = ./zellij.kdl;
|
||||
target = ".config/zellij/config.kdl";
|
||||
};
|
||||
};
|
||||
}
|
31
home-manager/shared/shell/zellij/zellij.kdl
Normal file
31
home-manager/shared/shell/zellij/zellij.kdl
Normal file
|
@ -0,0 +1,31 @@
|
|||
session_serialization true
|
||||
theme "catppuccin-macchiato"
|
||||
|
||||
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"
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue