feat(zellij): rice zellij status bar
This commit is contained in:
parent
3a5d53def7
commit
d475cd4298
4 changed files with 160 additions and 7 deletions
109
flake.lock
generated
109
flake.lock
generated
|
@ -1,5 +1,20 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"crane": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1743700120,
|
||||||
|
"narHash": "sha256-8BjG/P0xnuCyVOXlYRwdI1B8nVtyYLf3oDwPSimqREY=",
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"repo": "crane",
|
||||||
|
"rev": "e316f19ee058e6db50075115783be57ac549c389",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"repo": "crane",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"disko": {
|
"disko": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -127,6 +142,24 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-utils_4": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_5"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -270,6 +303,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1743689281,
|
||||||
|
"narHash": "sha256-y7Hg5lwWhEOgflEHRfzSH96BOt26LaYfrYWzZ+VoVdg=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "2bfc080955153be0be56724be6fa5477b4eefabb",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixspect": {
|
"nixspect": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2"
|
||||||
|
@ -349,7 +398,8 @@
|
||||||
"nvf": "nvf",
|
"nvf": "nvf",
|
||||||
"snowfall-lib": "snowfall-lib",
|
"snowfall-lib": "snowfall-lib",
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix",
|
||||||
"stable-diffusion-webui-nix": "stable-diffusion-webui-nix"
|
"stable-diffusion-webui-nix": "stable-diffusion-webui-nix",
|
||||||
|
"zjstatus": "zjstatus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
|
@ -374,6 +424,27 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"rust-overlay_2": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"zjstatus",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1743682350,
|
||||||
|
"narHash": "sha256-S/MyKOFajCiBm5H5laoE59wB6w0NJ4wJG53iAPfYW3k=",
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"rev": "c4a8327b0f25d1d81edecbb6105f74d7cf9d7382",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"snowfall-lib": {
|
"snowfall-lib": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
|
@ -498,6 +569,42 @@
|
||||||
"repo": "default",
|
"repo": "default",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"systems_5": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zjstatus": {
|
||||||
|
"inputs": {
|
||||||
|
"crane": "crane",
|
||||||
|
"flake-utils": "flake-utils_4",
|
||||||
|
"nixpkgs": "nixpkgs_3",
|
||||||
|
"rust-overlay": "rust-overlay_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1745230073,
|
||||||
|
"narHash": "sha256-OER99U7MiqQ47myvbsiljsax7OsK19NMds4NBM9XXLs=",
|
||||||
|
"owner": "dj95",
|
||||||
|
"repo": "zjstatus",
|
||||||
|
"rev": "a819e3bfe6bfef0438d811cdbb1bcfdc29912c62",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "dj95",
|
||||||
|
"repo": "zjstatus",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
nixspect.url = "github:rrvsh/nixspect";
|
nixspect.url = "github:rrvsh/nixspect";
|
||||||
stable-diffusion-webui-nix.url = "github:Janrupf/stable-diffusion-webui-nix/main";
|
stable-diffusion-webui-nix.url = "github:Janrupf/stable-diffusion-webui-nix/main";
|
||||||
stable-diffusion-webui-nix.inputs.nixpkgs.follows = "nixpkgs";
|
stable-diffusion-webui-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
zjstatus.url = "github:dj95/zjstatus";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
|
@ -27,6 +28,9 @@
|
||||||
snowfall.namespace = "pantheon";
|
snowfall.namespace = "pantheon";
|
||||||
overlays = with inputs; [
|
overlays = with inputs; [
|
||||||
stable-diffusion-webui-nix.overlays.default
|
stable-diffusion-webui-nix.overlays.default
|
||||||
|
(final: prev: {
|
||||||
|
zjstatus = zjstatus.packages.${prev.system}.default;
|
||||||
|
})
|
||||||
];
|
];
|
||||||
systems.modules.nixos = with inputs; [
|
systems.modules.nixos = with inputs; [
|
||||||
disko.nixosModules.disko
|
disko.nixosModules.disko
|
||||||
|
|
|
@ -3,10 +3,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
globalStyle = "double";
|
globalStyle = "double";
|
||||||
};
|
};
|
||||||
breadcrumbs = {
|
breadcrumbs.enable = true;
|
||||||
enable = true;
|
|
||||||
navbuddy.enable = true;
|
|
||||||
};
|
|
||||||
colorizer.enable = true;
|
colorizer.enable = true;
|
||||||
illuminate.enable = true;
|
illuminate.enable = true;
|
||||||
noice.enable = true;
|
noice.enable = true;
|
||||||
|
|
|
@ -1,18 +1,63 @@
|
||||||
{ config, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
config = lib.mkIf (config.cli.multiplexer == "zellij") {
|
config = lib.mkIf (config.cli.multiplexer == "zellij") {
|
||||||
home.sessionVariables.MULTIPLEXER = "zellij";
|
home.sessionVariables.MULTIPLEXER = "zellij";
|
||||||
|
home.persistence."/persist/home/${config.snowfallorg.user.name}".directories = [ "/.cache/zellij" ];
|
||||||
programs.zellij = {
|
programs.zellij = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
attachExistingSession = true;
|
attachExistingSession = true;
|
||||||
exitShellOnExit = true;
|
exitShellOnExit = true;
|
||||||
settings = {
|
settings = {
|
||||||
default_layout = "compact";
|
|
||||||
pane_frames = false;
|
pane_frames = false;
|
||||||
show_startup_tips = false;
|
show_startup_tips = false;
|
||||||
show_release_notes = false;
|
show_release_notes = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
xdg.configFile."zellij/layouts/default.kdl".text = # kdl
|
||||||
|
''
|
||||||
|
layout {
|
||||||
|
default_tab_template {
|
||||||
|
pane size=1 borderless=true {
|
||||||
|
plugin location="file:${pkgs.zjstatus}/bin/zjstatus.wasm" {
|
||||||
|
format_left "{mode} {command_pwd}"
|
||||||
|
format_center "{tabs}"
|
||||||
|
format_right "{datetime}"
|
||||||
|
format_space ""
|
||||||
|
format_hide_on_overlength "true"
|
||||||
|
format_precedence "lrc"
|
||||||
|
|
||||||
|
border_enabled "false"
|
||||||
|
border_char "─"
|
||||||
|
border_format "#[fg=#6C7086]{char}"
|
||||||
|
border_position "top"
|
||||||
|
|
||||||
|
hide_frame_for_single_pane "false"
|
||||||
|
|
||||||
|
mode_normal "#[bg=#89B4FA] {name} "
|
||||||
|
|
||||||
|
tab_normal "#[fg=#6C7086] {index} "
|
||||||
|
tab_active "#[fg=#9399B2,bold,italic] {index} "
|
||||||
|
tab_display_count "3" // limit to showing 3 tabs
|
||||||
|
tab_truncate_start_format "#[fg=red,bg=#181825] < +{count} ..."
|
||||||
|
tab_truncate_end_format "#[fg=red,bg=#181825] ... +{count} >"
|
||||||
|
|
||||||
|
command_pwd_command "pwd"
|
||||||
|
command_pwd_format "{stdout}"
|
||||||
|
|
||||||
|
datetime "#[fg=#6C7086,bold] {format} "
|
||||||
|
datetime_format "%A, %d %b %Y %H:%M"
|
||||||
|
datetime_timezone "Asia/Singapore"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
children
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue