zellij overhaul
This commit is contained in:
parent
fa3572d8dd
commit
4db8f8c571
10 changed files with 274 additions and 43 deletions
105
nix/home-manager/flake.lock
generated
105
nix/home-manager/flake.lock
generated
|
@ -1,5 +1,26 @@
|
|||
{
|
||||
"nodes": {
|
||||
"crane": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"zjstatus",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713979152,
|
||||
"narHash": "sha256-apdecPuh8SOQnkEET/kW/UcfjCRb8JbV5BKjoH+DcP4=",
|
||||
"owner": "ipetkov",
|
||||
"repo": "crane",
|
||||
"rev": "a5eca68a2cf11adb32787fc141cddd29ac8eb79c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ipetkov",
|
||||
"repo": "crane",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
|
@ -18,6 +39,24 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"haumea": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
|
@ -266,7 +305,33 @@
|
|||
"home-manager": "home-manager",
|
||||
"nix-index-database": "nix-index-database",
|
||||
"nixneovim": "nixneovim",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"zjstatus": "zjstatus"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"zjstatus",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"zjstatus",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714097613,
|
||||
"narHash": "sha256-044xbpBszupqN3nl/CGOCJtTQ4O6Aca81mJpX45i8/I=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "2a42c742ab04b61d9b2f1edf392842cf9f27ebfd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
|
@ -283,6 +348,44 @@
|
|||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"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_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714117167,
|
||||
"narHash": "sha256-Dw+x2AWL5BKmkZL1Aewlh8Elp+4bhsR0ukaukqnm2Uo=",
|
||||
"owner": "dj95",
|
||||
"repo": "zjstatus",
|
||||
"rev": "cda2388764cc96832d7260e4114fc5c5c8699de3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "dj95",
|
||||
"repo": "zjstatus",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
|
@ -24,6 +24,12 @@
|
|||
home-manager.follows = "home-manager";
|
||||
};
|
||||
};
|
||||
zjstatus = {
|
||||
url = "github:dj95/zjstatus";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
|
@ -31,11 +37,10 @@
|
|||
nixpkgs,
|
||||
home-manager,
|
||||
nix-index-database,
|
||||
# emacs-overlay,
|
||||
nixneovim,
|
||||
zjstatus,
|
||||
...
|
||||
}: let
|
||||
inherit (nixpkgs.lib) optionalAttrs singleton optionals;
|
||||
supportedSystems = ["aarch64-darwin" "x86_64-linux"];
|
||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||
|
||||
|
@ -46,6 +51,9 @@
|
|||
config = {allowUnfree = true;};
|
||||
overlays = [
|
||||
nixneovim.overlays.default
|
||||
(final: prev: {
|
||||
zjstatus = zjstatus.packages.${prev.system}.default;
|
||||
})
|
||||
# emacs-overlay.overlays.default
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
caches,
|
||||
...
|
||||
}: let
|
||||
inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux;
|
||||
{pkgs, ...}: let
|
||||
inherit (pkgs.stdenv.hostPlatform) isDarwin;
|
||||
in {
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux;
|
||||
inherit (pkgs.stdenv.hostPlatform) isLinux;
|
||||
repo_root = "../../..";
|
||||
nv_fonts_basic = ["Iosevka Custom"];
|
||||
nv_fonts_normal =
|
||||
|
|
|
@ -1,13 +1,72 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
{pkgs, ...}: let
|
||||
zjstatus_config = ''
|
||||
pane size=1 borderless=true {
|
||||
plugin location="file:${pkgs.zjstatus}/bin/zjstatus.wasm" {
|
||||
format_left "{mode}#[fg=black,bg=blue,bold]{session} #[fg=blue,bg=#181825]{tabs}"
|
||||
format_right "#[fg=#181825,bg=#b1bbfa]{datetime}"
|
||||
format_space "#[bg=#181825]"
|
||||
|
||||
hide_frame_for_single_pane "true"
|
||||
|
||||
mode_normal "#[bg=blue] "
|
||||
mode_tmux "#[bg=green] "
|
||||
|
||||
tab_normal "#[fg=#181825,bg=#4C4C59] #[fg=#000000,bg=#4C4C59]{index} {name} #[fg=#4C4C59,bg=#181825]"
|
||||
tab_normal_fullscreen "#[fg=#6C7086,bg=#181825] {index} {name} [] "
|
||||
tab_normal_sync "#[fg=#6C7086,bg=#181825] {index} {name} <> "
|
||||
tab_active "#[fg=#181825,bg=#ffffff,bold,italic] {index} {name} #[fg=#ffffff,bg=#181825]"
|
||||
tab_active_fullscreen "#[fg=#9399B2,bg=#181825,bold,italic] {index} {name} [] "
|
||||
tab_active_sync "#[fg=#9399B2,bg=#181825,bold,italic] {index} {name} <> "
|
||||
|
||||
|
||||
datetime "#[fg=#6C7086,bg=#b1bbfa,bold] {format} "
|
||||
datetime_format "%A, %d %b %Y %H:%M"
|
||||
datetime_timezone "Europe/Berlin"
|
||||
}
|
||||
}'';
|
||||
in {
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
# enableZshIntegration = true; # automatically sets up a session - I don't want this, I want manual control of my sessions
|
||||
};
|
||||
|
||||
home.file.".config/zellij/config.kdl".source = ../../../../zellij/config.kdl;
|
||||
xdg.configFile = {
|
||||
"zellij/config.kdl".source = ../../../../zellij/config.kdl;
|
||||
"zellij/layouts/jelly_layout.kdl".text = ''
|
||||
layout {
|
||||
cwd "/Users/acicchetti"
|
||||
default_tab_template {
|
||||
children
|
||||
${zjstatus_config}
|
||||
}
|
||||
tab name="jellyfish" {
|
||||
pane {
|
||||
split_direction "vertical"
|
||||
name "jellyfish"
|
||||
cwd "src/jellyfish"
|
||||
}
|
||||
}
|
||||
tab name="infra" {
|
||||
pane {
|
||||
split_direction "vertical"
|
||||
name "infra"
|
||||
cwd "src/infra"
|
||||
}
|
||||
}
|
||||
tab name="misc" {
|
||||
pane {
|
||||
split_direction "vertical"
|
||||
name "misc"
|
||||
}
|
||||
}
|
||||
}
|
||||
'';
|
||||
"zellij/layouts/default.kdl".text = ''
|
||||
layout {
|
||||
default_tab_template {
|
||||
children
|
||||
${zjstatus_config}
|
||||
}
|
||||
}'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
{pkgs, ...}: let
|
||||
inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux;
|
||||
in {
|
||||
programs.zsh = {
|
||||
|
@ -81,15 +76,18 @@ in {
|
|||
RPROMPT = "' '"; # Fixes a side-effect of the vi-mode oh-my-zsh plugin
|
||||
KEYTIMEOUT = 1;
|
||||
};
|
||||
shellAliases =
|
||||
if isLinux
|
||||
then {
|
||||
cp = "cp --reflink=auto";
|
||||
}
|
||||
else {
|
||||
# exa = "eza -l --git";
|
||||
# ls = "exa";
|
||||
nv = "neovide";
|
||||
};
|
||||
shellAliases = let
|
||||
platformSpecificAliases =
|
||||
if isLinux
|
||||
then {
|
||||
cp = "cp --reflink=auto";
|
||||
}
|
||||
else {
|
||||
# exa = "eza -l --git";
|
||||
# ls = "exa";
|
||||
nv = "neovide";
|
||||
};
|
||||
in
|
||||
{zj = "zellij -l welcome";} // platformSpecificAliases;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -188,6 +188,13 @@ keybinds clear-defaults=true {
|
|||
bind "Ctrl s" { SwitchToMode "scroll"; }
|
||||
bind "Ctrl q" { Quit; }
|
||||
bind "d" { Detach; }
|
||||
bind "w" {
|
||||
LaunchOrFocusPlugin "session-manager" {
|
||||
floating true
|
||||
move_to_focused_tab true
|
||||
};
|
||||
SwitchToMode "Normal"
|
||||
}
|
||||
bind "Alt n" { NewPane; }
|
||||
bind "Alt h" { MoveFocus "Left"; }
|
||||
bind "Alt l" { MoveFocus "Right"; }
|
||||
|
@ -375,4 +382,12 @@ plugins {
|
|||
tab-bar { path "tab-bar"; }
|
||||
status-bar { path "status-bar"; }
|
||||
strider { path "strider"; }
|
||||
compact-bar location="zellij:compact-bar"
|
||||
session-manager location="zellij:session-manager"
|
||||
welcome-screen location="zellij:session-manager" {
|
||||
welcome_screen true
|
||||
}
|
||||
filepicker location="zellij:strider" {
|
||||
cwd "/"
|
||||
}
|
||||
}
|
||||
|
|
28
zellij/layouts/default.kdl
Normal file
28
zellij/layouts/default.kdl
Normal file
|
@ -0,0 +1,28 @@
|
|||
layout {
|
||||
default_tab_template {
|
||||
children
|
||||
pane size=1 borderless=true {
|
||||
plugin location="file:${pkgs.zjstatus}/bin/zjstatus.wasm" {
|
||||
format_left "{mode}#[fg=black,bg=blue,bold]{session} #[fg=blue,bg=#181825]{tabs}"
|
||||
format_right "#[fg=#181825,bg=#b1bbfa]{datetime}"
|
||||
format_space "#[bg=#181825]"
|
||||
|
||||
hide_frame_for_single_pane "true"
|
||||
|
||||
mode_normal "#[bg=blue] "
|
||||
|
||||
tab_normal "#[fg=#181825,bg=#4C4C59] #[fg=#000000,bg=#4C4C59]{index} {name} #[fg=#4C4C59,bg=#181825]"
|
||||
tab_normal_fullscreen "#[fg=#6C7086,bg=#181825] {index} {name} [] "
|
||||
tab_normal_sync "#[fg=#6C7086,bg=#181825] {index} {name} <> "
|
||||
tab_active "#[fg=#181825,bg=#ffffff,bold,italic] {index} {name} #[fg=#ffffff,bg=#181825]"
|
||||
tab_active_fullscreen "#[fg=#9399B2,bg=#181825,bold,italic] {index} {name} [] "
|
||||
tab_active_sync "#[fg=#9399B2,bg=#181825,bold,italic] {index} {name} <> "
|
||||
|
||||
|
||||
datetime "#[fg=#6C7086,bg=#b1bbfa,bold] {format} "
|
||||
datetime_format "%A, %d %b %Y %H:%M"
|
||||
datetime_timezone "Europe/Berlin" // plugin configuration...
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
33
zellij/layouts/jelly_layout.kdl
Normal file
33
zellij/layouts/jelly_layout.kdl
Normal file
|
@ -0,0 +1,33 @@
|
|||
---
|
||||
layout {
|
||||
cwd "/Users/acicchetti"
|
||||
default_tab_template {
|
||||
pane size=1 borderless=true {
|
||||
plugin location="zellij:tab-bar"
|
||||
}
|
||||
children
|
||||
pane size=2 borderless=true {
|
||||
plugin location="zellij:status-bar"
|
||||
}
|
||||
}
|
||||
tab name="jellyfish" {
|
||||
pane {
|
||||
split_direction "vertical"
|
||||
name "jellyfish"
|
||||
cwd "src/jellyfish"
|
||||
}
|
||||
}
|
||||
tab name="infra" {
|
||||
pane {
|
||||
split_direction "vertical"
|
||||
name "infra"
|
||||
cwd "src/infra"
|
||||
}
|
||||
}
|
||||
tab name="misc" {
|
||||
pane {
|
||||
split_direction "vertical"
|
||||
name "misc"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -40,14 +40,7 @@ if [[ -d ~/.cargo/bin ]]; then
|
|||
fi
|
||||
|
||||
function dt() {
|
||||
local session_name
|
||||
session_name=${1:-DefaultSession}
|
||||
|
||||
if [[ "${SESSION_MANAGER}" == "tmux" ]]; then
|
||||
tmux -u -2 new-session -A -s $session_name
|
||||
else
|
||||
zellij attach -c $session_name
|
||||
fi
|
||||
zellij -l welcome
|
||||
}
|
||||
|
||||
function root() {
|
||||
|
|
Loading…
Add table
Reference in a new issue