Remove custom zellij layouts; auto-rename new tabs to cwd

This commit is contained in:
Daniel Lynn 2025-04-16 15:18:38 -05:00
parent 852ebd4cb2
commit f906dd126c
Signed by: daniel
GPG Key ID: 28496A140E180A9D
2 changed files with 10 additions and 92 deletions

View File

@ -1,87 +0,0 @@
layout {
pane_template name="explorer" {
pane split_direction="vertical" {
pane size="14%" borderless=true command="zsh" {
args "-i" "-c" "exex"
}
children
}
}
pane_template name="sidebar-pane" {
pane size="24%" split_direction="horizontal" { children; }
}
pane_template name="console-pane" {
pane size="28%" split_direction="vertical" { children; }
}
pane_template name="stacked-console-pane" {
pane size="28%" stacked=true { children; }
}
tab_template name="project-tab" {
pane size=1 borderless=true { plugin location="zellij:compact-bar"; }
children
}
default_tab_template {
pane size=1 borderless=true { plugin location="zellij:compact-bar"; }
explorer { pane focus=true; }
}
swap_tiled_layout name="ide" {
project-tab max_panes=3 {
explorer { pane; }
}
project-tab exact_panes=4 {
explorer { pane; }
console-pane split_direction="vertical" size="28%" { pane; }
}
project-tab exact_panes=5 {
explorer { pane; }
console-pane split_direction="vertical" size="28%" {
pane
pane
}
}
project-tab exact_panes=6 {
explorer { pane; }
stacked-console-pane stacked=true size="28%" {
pane
pane
pane
}
}
project-tab exact_panes=7 {
explorer split_direction="vertical" {
pane
sidebar-pane size="24%" { pane borderless=true; }
}
stacked-console-pane stacked=true size="28%" {
pane
pane
pane
}
}
project-tab min_panes=8 {
explorer {
pane split_direction="vertical" {
pane
pane
pane
}
pane split_direction="vertical" {
pane
pane
pane
}
pane split_direction="vertical" {
pane
pane
pane
}
}
}
}
}

View File

@ -1,11 +1,12 @@
# zellij
if (( $+commands[zellij] )); then
# Uncomment to start zellij automatically
# Uncomment to start/exit zellij automatically
# ZELLIJ_AUTO_ATTACH=true
# ZELLIJ_AUTO_EXIT=true
# eval "$(zellij setup --generate-auto-start zsh)"
if (( $+commands[sk] )); then
za() {
function za {
local zj_sessions=$(zellij list-sessions -ns)
local no_sessions=$(echo "${zj_sessions}" | wc -l)
@ -17,4 +18,8 @@ if (( $+commands[zellij] )); then
fi
}
fi
if [[ -v ZELLIJ ]]; then
zellij action rename-tab "${PWD##*/}"
fi
fi