Improve shell
This commit is contained in:
parent
ad844d9266
commit
243f5b5607
1 changed files with 108 additions and 1 deletions
|
@ -20,6 +20,97 @@
|
||||||
|
|
||||||
programs.ripgrep.enable = true;
|
programs.ripgrep.enable = true;
|
||||||
|
|
||||||
|
programs.fd.enable = true;
|
||||||
|
|
||||||
|
programs.zellij =
|
||||||
|
let
|
||||||
|
zjstatus = pkgs.fetchurl {
|
||||||
|
url = "https://github.com/dj95/zjstatus/releases/download/v0.17.0/zjstatus.wasm";
|
||||||
|
hash = "sha256-IgTfSl24Eap+0zhfiwTvmdVy/dryPxfEF7LhVNVXe+U=";
|
||||||
|
};
|
||||||
|
layout = pkgs.writeText "layout.kdl" ''
|
||||||
|
layout {
|
||||||
|
default_tab_template {
|
||||||
|
pane size=1 borderless=true {
|
||||||
|
plugin location="file:${zjstatus}" {
|
||||||
|
// Nord theme
|
||||||
|
color_fg "#cdd6f4"
|
||||||
|
color_bg "#1e1e2e"
|
||||||
|
color_black "#45475a"
|
||||||
|
color_red "#f38ba8"
|
||||||
|
color_green "#a6e3a1"
|
||||||
|
color_yellow "#f9e2af"
|
||||||
|
color_blue "#89b4fa"
|
||||||
|
color_magenta "#f5c2e7"
|
||||||
|
color_cyan "#94e2d5"
|
||||||
|
color_white "#bac2de"
|
||||||
|
|
||||||
|
format_left "{mode}#[bg=$bg] {tabs}"
|
||||||
|
format_center "#[bg=$bg,fg=$fg] Zellij: #[bg=$bg,fg=$fg]{session}"
|
||||||
|
format_right "{datetime}"
|
||||||
|
format_space "#[bg=$bg]"
|
||||||
|
format_hide_on_overlength "true"
|
||||||
|
format_precedence "crl"
|
||||||
|
|
||||||
|
border_enabled "false"
|
||||||
|
border_char "─"
|
||||||
|
border_format "#[fg=#6C7086]{char}"
|
||||||
|
border_position "top"
|
||||||
|
|
||||||
|
hide_frame_for_single_pane "true"
|
||||||
|
|
||||||
|
mode_normal "#[bg=$green,fg=$bg,bold] NORMAL #[bg=$bg,fg=$green]"
|
||||||
|
mode_locked "#[bg=$red,fg=$bg,bold] LOCKED #[bg=$bg,fg=$red]"
|
||||||
|
mode_resize "#[bg=$blue,fg=$bg,bold] RESIZE #[bg=$bg,fg=$blue]"
|
||||||
|
mode_pane "#[bg=$blue,fg=$bg,bold] PANE #[bg=$bg,fg=$blue]"
|
||||||
|
mode_tab "#[bg=$yellow,fg=$bg,bold] TAB #[bg=$bg,fg=$yellow]"
|
||||||
|
mode_scroll "#[bg=$blue,fg=$bg,bold] SCROLL #[bg=$bg,fg=$blue]"
|
||||||
|
mode_enter_search "#[bg=$yellow,fg=$bg,bold] ENT-SEARCH #[bg=$bg,fg=$yellow]"
|
||||||
|
mode_search "#[bg=$yellow,fg=$bg,bold] SEARCHARCH #[bg=$bg,fg=$yellow]"
|
||||||
|
mode_rename_tab "#[bg=$yellow,fg=$bg,bold] RENAME-TAB #[bg=$bg,fg=$yellow]"
|
||||||
|
mode_rename_pane "#[bg=$blue,fg=$bg,bold] RENAME-PANE #[bg=$bg,fg=$blue]"
|
||||||
|
mode_session "#[bg=$blue,fg=$bg,bold] SESSION #[bg=$bg,fg=$blue]"
|
||||||
|
mode_move "#[bg=$blue,fg=$bg,bold] MOVE #[bg=$bg,fg=$blue]"
|
||||||
|
mode_prompt "#[bg=$blue,fg=$bg,bold] PROMPT #[bg=$bg,fg=$blue]"
|
||||||
|
mode_tmux "#[bg=$magenta,fg=$bg,bold] TMUX #[bg=$bg,fg=$magenta]"
|
||||||
|
|
||||||
|
// formatting for inactive tabs
|
||||||
|
tab_normal "#[bg=$bg,fg=$cyan]#[bg=$cyan,fg=$bg,bold]{index} #[bg=$bg,fg=$cyan,bold] {name}{floating_indicator}#[bg=$bg,fg=$bg,bold]"
|
||||||
|
tab_normal_fullscreen "#[bg=$bg,fg=$cyan]#[bg=$cyan,fg=$bg,bold]{index} #[bg=$bg,fg=$cyan,bold] {name}{fullscreen_indicator}#[bg=$bg,fg=$bg,bold]"
|
||||||
|
tab_normal_sync "#[bg=$bg,fg=$cyan]#[bg=$cyan,fg=$bg,bold]{index} #[bg=$bg,fg=$cyan,bold] {name}{sync_indicator}#[bg=$bg,fg=$bg,bold]"
|
||||||
|
|
||||||
|
// formatting for the current active tab
|
||||||
|
tab_active "#[bg=$bg,fg=$yellow]#[bg=$yellow,fg=$bg,bold]{index} #[bg=$bg,fg=$yellow,bold] {name}{floating_indicator}#[bg=$bg,fg=$bg,bold]"
|
||||||
|
tab_active_fullscreen "#[bg=$bg,fg=$yellow]#[bg=$yellow,fg=$bg,bold]{index} #[bg=$bg,fg=$yellow,bold] {name}{fullscreen_indicator}#[bg=$bg,fg=$bg,bold]"
|
||||||
|
tab_active_sync "#[bg=$bg,fg=$yellow]#[bg=$yellow,fg=$bg,bold]{index} #[bg=$bg,fg=$yellow,bold] {name}{sync_indicator}#[bg=$bg,fg=$bg,bold]"
|
||||||
|
|
||||||
|
// separator between the tabs
|
||||||
|
tab_separator "#[bg=$bg] "
|
||||||
|
|
||||||
|
// indicators
|
||||||
|
tab_sync_indicator " "
|
||||||
|
tab_fullscreen_indicator " "
|
||||||
|
tab_floating_indicator " "
|
||||||
|
|
||||||
|
datetime "#[fg=$fg] {format} "
|
||||||
|
datetime_format "%Y-%m-%d %H:%M"
|
||||||
|
datetime_timezone "Europe/Rome"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
children
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
settings = {
|
||||||
|
default_layout = "${layout}";
|
||||||
|
pane_frames = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
programs.direnv = {
|
programs.direnv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {
|
config = {
|
||||||
|
@ -29,7 +120,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.lsd = {
|
programs.lsd = {
|
||||||
enable = false;
|
enable = true;
|
||||||
enableAliases = true;
|
enableAliases = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -62,6 +153,16 @@
|
||||||
|
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
plugins = [
|
||||||
|
{
|
||||||
|
name = "fifc";
|
||||||
|
src = pkgs.fishPlugins.fifc.src;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "z";
|
||||||
|
src = pkgs.fishPlugins.fifc.src;
|
||||||
|
}
|
||||||
|
];
|
||||||
shellInit =
|
shellInit =
|
||||||
''
|
''
|
||||||
fish_vi_key_bindings
|
fish_vi_key_bindings
|
||||||
|
@ -84,8 +185,14 @@
|
||||||
ffmpeg-headless
|
ffmpeg-headless
|
||||||
jless
|
jless
|
||||||
nix-melt
|
nix-melt
|
||||||
|
nurl
|
||||||
jq
|
jq
|
||||||
yq-go
|
yq-go
|
||||||
|
procs
|
||||||
|
chafa
|
||||||
|
hexyl
|
||||||
|
broot
|
||||||
|
file
|
||||||
]
|
]
|
||||||
++ (lib.optionals
|
++ (lib.optionals
|
||||||
(builtins.elem hostname [
|
(builtins.elem hostname [
|
||||||
|
|
Loading…
Add table
Reference in a new issue