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"
|
||||
fi
|
||||
|
||||
if (( $+commands[zellij] )); then
|
||||
alias ide="zellij --layout ${HOME}/.config/zellij/layouts/ide.kdl"
|
||||
fi
|
||||
|
||||
if (( $+commands[coreutils] )); then
|
||||
alias [
|
||||
alias arch="coreutils arch"
|
||||
|
@ -63,12 +63,6 @@ keybinds {
|
||||
bind "8" { GoToTab 8; SwitchToMode "Normal"; }
|
||||
bind "9" { GoToTab 9; SwitchToMode "Normal"; }
|
||||
bind "Tab" { ToggleTab; }
|
||||
bind "i" {
|
||||
NewTab {
|
||||
layout "/home/daniel/.config/zellij/layouts/ide.kdl"
|
||||
}
|
||||
SwitchToMode "Normal"
|
||||
}
|
||||
}
|
||||
scroll {
|
||||
bind "Ctrl s" { SwitchToMode "Normal"; }
|
||||
|
21
zshrc
21
zshrc
@ -106,18 +106,17 @@ if (( $+commands[zellij] )); then
|
||||
ZELLIJ_AUTO_ATTACH=true
|
||||
eval "$(zellij setup --generate-auto-start zsh)"
|
||||
|
||||
if (( ${+ZELLIJ} )); then
|
||||
zellij_chpwd_hook() {
|
||||
local cwd=${PWD##*/}
|
||||
local cwd=${cwd:-/}
|
||||
ide() {
|
||||
local layout="${HOME}/.config/zellij/layouts/ide.kdl"
|
||||
local name=${PWD##*/}
|
||||
local name=${name:-/}
|
||||
|
||||
zellij action rename-tab $cwd
|
||||
}
|
||||
|
||||
chpwd_functions+=( zellij_chpwd_hook )
|
||||
|
||||
zellij_chpwd_hook
|
||||
fi
|
||||
if (( ${+ZELLIJ} )); then
|
||||
zellij action new-tab --layout "${layout}" --cwd "${PWD}" --name "${name}"
|
||||
else
|
||||
zellij --layout "${layout}" $@
|
||||
fi
|
||||
}
|
||||
fi
|
||||
|
||||
# git
|
||||
|
Loading…
x
Reference in New Issue
Block a user