feat: added zellij plugin 'zjstatus'

This commit is contained in:
ooks-io 2024-02-05 15:54:24 +13:00
parent 96fda609b7
commit 4e4f46a183
4 changed files with 164 additions and 5 deletions

119
flake.lock generated
View file

@ -37,6 +37,27 @@
"type": "github"
}
},
"crane_2": {
"inputs": {
"nixpkgs": [
"zjstatus",
"nixpkgs"
]
},
"locked": {
"lastModified": 1706979728,
"narHash": "sha256-X4nEYqI4bpCFF/Ck1HV9RuBVVYcwIeW8MEkHw+UeoO4=",
"owner": "ipetkov",
"repo": "crane",
"rev": "b693ec872ea8511fc8c233022e4f0eabb43bd9be",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"firefox-addons": {
"inputs": {
"flake-utils": "flake-utils",
@ -166,6 +187,24 @@
"type": "github"
}
},
"flake-utils_4": {
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
@ -591,6 +630,22 @@
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1706925685,
"narHash": "sha256-hVInjWMmgH4yZgA4ZtbgJM1qEAel72SYhP5nOWX4UIM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "79a13f1437e149dc7be2d1290c74d378dad60814",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": {
"inputs": {
"flake-parts": "flake-parts_2",
@ -657,7 +712,8 @@
"nix-colors": "nix-colors",
"nix-gaming": "nix-gaming",
"nixpkgs": "nixpkgs_4",
"nixvim": "nixvim"
"nixvim": "nixvim",
"zjstatus": "zjstatus"
}
},
"rust-overlay": {
@ -685,6 +741,31 @@
"type": "github"
}
},
"rust-overlay_2": {
"inputs": {
"flake-utils": [
"zjstatus",
"flake-utils"
],
"nixpkgs": [
"zjstatus",
"nixpkgs"
]
},
"locked": {
"lastModified": 1707012820,
"narHash": "sha256-4cxIaHUx6/DSEVHJfK0gx4DZkJ5xHugan27KfuVPnj0=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "b83b8c3ef16d15a4ae3843d74f32dfc86caed60f",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
@ -730,6 +811,21 @@
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"wlroots": {
"flake": false,
"locked": {
@ -778,6 +874,27 @@
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
},
"zjstatus": {
"inputs": {
"crane": "crane_2",
"flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_5",
"rust-overlay": "rust-overlay_2"
},
"locked": {
"lastModified": 1707060747,
"narHash": "sha256-1PnEEiSNWpEl5ssgJUPwzVNRcyByJV4t6q6raH2QqHI=",
"owner": "dj95",
"repo": "zjstatus",
"rev": "2109f3fe43e356192279400ec365a127412d662f",
"type": "github"
},
"original": {
"owner": "dj95",
"repo": "zjstatus",
"type": "github"
}
}
},
"root": "root",

View file

@ -49,6 +49,8 @@
nix-gaming.url = "github:fufexan/nix-gaming";
zjstatus.url = "github:dj95/zjstatus";
};

View file

@ -1,4 +1,4 @@
{ lib, config, ... }:
{ lib, config, pkgs, ... }:
let
inherit (config) colorscheme;
inherit (colorscheme) colors;
@ -30,6 +30,43 @@ in
};
};
};
xdg.configFile."zellij/layouts/zjstatus.kld".text = /* kdl */ ''
layout {
pane split_direction="vertical" {
pane
}
pane size=1 borderless=true {
plugin location="file:${pkgs.zjstatus}/bin/zjstatus.wasm" {
format_left "{mode} #[fg=#89B4FA,bold]{session} {tabs}"
format_right "{command_git_branch} {datetime}"
format_space ""
border_enabled "false"
border_char ""
border_format "#[fg=#6C7086]{char}"
border_position "top"
hide_frame_for_single_pane "true"
mode_normal "#[bg=blue] "
mode_tmux "#[bg=#ffc387] "
tab_normal "#[fg=#6C7086] {name} "
tab_active "#[fg=#9399B2,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=#6C7086,bold] {format} "
datetime_format "%A, %d %b %Y %H:%M"
datetime_timezone "Pacific/Auckland"
}
}
}
'';
};
}

View file

@ -1,4 +1,4 @@
{ outputs, inputs }:
{ outputs, inputs, ... }:
{
# For every flake input, aliases 'pkgs.inputs.${flake}' to
# 'inputs.${flake}.packages.${pkgs.system}' or
@ -14,6 +14,9 @@
inputs;
};
# Adds my custom packages
zjstatus = final: prev: {
zjstatus = inputs.zjstatus.packages.${prev.system}.default;
};
additions = final: prev: import ../pkgs { pkgs = final; };
}