Remove custom zellij layouts; auto-rename new tabs to cwd
This commit is contained in:
parent
852ebd4cb2
commit
f906dd126c
@ -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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,20 +1,25 @@
|
|||||||
# zellij
|
# zellij
|
||||||
if (( $+commands[zellij] )); then
|
if (( $+commands[zellij] )); then
|
||||||
# Uncomment to start zellij automatically
|
# Uncomment to start/exit zellij automatically
|
||||||
# ZELLIJ_AUTO_ATTACH=true
|
# ZELLIJ_AUTO_ATTACH=true
|
||||||
|
# ZELLIJ_AUTO_EXIT=true
|
||||||
# eval "$(zellij setup --generate-auto-start zsh)"
|
# eval "$(zellij setup --generate-auto-start zsh)"
|
||||||
|
|
||||||
if (( $+commands[sk] )); then
|
if (( $+commands[sk] )); then
|
||||||
za() {
|
function za {
|
||||||
local zj_sessions=$(zellij list-sessions -ns)
|
local zj_sessions=$(zellij list-sessions -ns)
|
||||||
local no_sessions=$(echo "${zj_sessions}" | wc -l)
|
local no_sessions=$(echo "${zj_sessions}" | wc -l)
|
||||||
|
|
||||||
if [ "${no_sessions}" -ge 2 ]; then
|
if [ "${no_sessions}" -ge 2 ]; then
|
||||||
zellij attach \
|
zellij attach \
|
||||||
"$(echo "${zj_sessions}" | sk)"
|
"$(echo "${zj_sessions}" | sk)"
|
||||||
else
|
else
|
||||||
zellij attach -c
|
zellij attach -c
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -v ZELLIJ ]]; then
|
||||||
|
zellij action rename-tab "${PWD##*/}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user