From 425ad95a972210b07edba4db43206068aa976ab8 Mon Sep 17 00:00:00 2001 From: José Juan Loeza Sierra Date: Wed, 19 Nov 2025 12:53:07 -0800 Subject: add script for reporting directy changes to foot This is done to that doing ctrl+shift+n will spawn a new instance in the cwd. See https://codeberg.org/dnkl/foot/wiki#spawning-new-terminal-instances-in-the-current-working-directory for more info. --- dot-bashrc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'dot-bashrc') diff --git a/dot-bashrc b/dot-bashrc index 1b215cb..3df8ad2 100644 --- a/dot-bashrc +++ b/dot-bashrc @@ -101,3 +101,21 @@ eval "$(zoxide init bash)" if [ "$CONTAINER_ID" = "dev" ]; then source ~/.bashrc.d/dev.bashrc fi + +# for spawning new terminal in cwd +# see https://codeberg.org/dnkl/foot/wiki#spawning-new-terminal-instances-in-the-current-working-directory +osc7_cwd() { + local strlen=${#PWD} + local encoded="" + local pos c o + for (( pos=0; pos