Skip to content

Dynamically modifying keybindings/configuration? #2142

Discussion options

You must be logged in to vote

so sounds like overlapping configurations, or conditional rules might be a solution here.

For now, I'm going to use a template file with envsubst and initiate the configuration based on that template.

Below is the exact details if anyone else is interested in understanding what I'm trying to simplify.

Auto start code

This is how I start zellij today - NOTE the $USER_IS_HOME test:

ZELLIJ_CFG_PATH="$HOME/.config/zellij/config"
ZELLIJ_CONFIG_FILE="${ZELLIJ_CFG_PATH}.ctrl-g.kdl"
[[ -z "$USER_IS_HOME" ]] || ZELLIJ_CONFIG_FILE="${ZELLIJ_CFG_PATH}.ctrl-b.kdl"
. <({
    zellij setup --generate-auto-start bash \
    | sed -E 's/attach -c/attach --create "${SUDO_USER:-$USER}@$(hostname)"/; '
})

ed…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Lockszmith-GH
Comment options

@imsnif
Comment options

@Lockszmith-GH
Comment options

Answer selected by Lockszmith-GH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants