~ cat ~/dotfiles/custom/modules/public/zellij.zsh
# zellij alias
alias ze=zellij
# zellij attach [container]
function za() {
zellij attach "$*"
}
# zellij run [command]
function zr() {
zellij run --name "$*" -- zsh -ic "$*"
}
# zellij run floating [command]
function zrf() {
zellij run --name "$*" --floating -- zsh -ic "$*"
}
# zellij edit file [file]
function zed() {
zellij edit "$@"
}
# zellij attach
function zs() {
sessions=$(zellij list-sessions --no-formatting | awk '{printf "\033[1;36m%-20s\033[0m %s\n", $1, $3}')
selected_session=$(echo "$sessions" | fzf --height ${FZF_TMUX_HEIGHT:-20%} --ansi)
if [ -n "$selected_session" ]; then
za $selected_session | awk '{print $1}'
fi
}
--
I'm currently working to write a plugin which will dynamically name zellij workspaces based on their context, with an easier way to rename them as well. The automatic naming scheme is annoying to remember as it chooses two words and stitches them together, e.g "brave-piano", "lucky-iguanadon".
yeah it’s a pretty brilliant stroke. and really augurs well for future software in this brave new world of interoperability. everywhere i look there’s cool projects plugging wasm in everywhere, and it just seems like there’s enormous potential.