Swap out ide alias for a function
This commit is contained in:
parent
77fcf956fe
commit
a1dd3a635a
4
aliases
4
aliases
@ -11,10 +11,6 @@ if (( $+commands[helix] )); then
|
|||||||
alias hx="helix"
|
alias hx="helix"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (( $+commands[zellij] )); then
|
|
||||||
alias ide="zellij --layout ${HOME}/.config/zellij/layouts/ide.kdl"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if (( $+commands[coreutils] )); then
|
if (( $+commands[coreutils] )); then
|
||||||
alias [
|
alias [
|
||||||
alias arch="coreutils arch"
|
alias arch="coreutils arch"
|
||||||
|
@ -63,12 +63,6 @@ keybinds {
|
|||||||
bind "8" { GoToTab 8; SwitchToMode "Normal"; }
|
bind "8" { GoToTab 8; SwitchToMode "Normal"; }
|
||||||
bind "9" { GoToTab 9; SwitchToMode "Normal"; }
|
bind "9" { GoToTab 9; SwitchToMode "Normal"; }
|
||||||
bind "Tab" { ToggleTab; }
|
bind "Tab" { ToggleTab; }
|
||||||
bind "i" {
|
|
||||||
NewTab {
|
|
||||||
layout "/home/daniel/.config/zellij/layouts/ide.kdl"
|
|
||||||
}
|
|
||||||
SwitchToMode "Normal"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
scroll {
|
scroll {
|
||||||
bind "Ctrl s" { SwitchToMode "Normal"; }
|
bind "Ctrl s" { SwitchToMode "Normal"; }
|
||||||
|
19
zshrc
19
zshrc
@ -106,18 +106,17 @@ if (( $+commands[zellij] )); then
|
|||||||
ZELLIJ_AUTO_ATTACH=true
|
ZELLIJ_AUTO_ATTACH=true
|
||||||
eval "$(zellij setup --generate-auto-start zsh)"
|
eval "$(zellij setup --generate-auto-start zsh)"
|
||||||
|
|
||||||
|
ide() {
|
||||||
|
local layout="${HOME}/.config/zellij/layouts/ide.kdl"
|
||||||
|
local name=${PWD##*/}
|
||||||
|
local name=${name:-/}
|
||||||
|
|
||||||
if (( ${+ZELLIJ} )); then
|
if (( ${+ZELLIJ} )); then
|
||||||
zellij_chpwd_hook() {
|
zellij action new-tab --layout "${layout}" --cwd "${PWD}" --name "${name}"
|
||||||
local cwd=${PWD##*/}
|
else
|
||||||
local cwd=${cwd:-/}
|
zellij --layout "${layout}" $@
|
||||||
|
|
||||||
zellij action rename-tab $cwd
|
|
||||||
}
|
|
||||||
|
|
||||||
chpwd_functions+=( zellij_chpwd_hook )
|
|
||||||
|
|
||||||
zellij_chpwd_hook
|
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# git
|
# git
|
||||||
|
Loading…
x
Reference in New Issue
Block a user