Create a lightweight sandbox to hide ~/.config/.
Launch an interactive bash shell inside the sandbox:
./sandyRun a command directly in the sandbox:
./sandy echo "hello world"Run a shell command with shell features (pipes, redirects, built-ins, etc.):
./sandy -c "echo hello > /dev/null"
# or
./sandy bash -c "ls -la | grep src"The sandbox is implemented using Bubblewrap (bwrap), an unprivileged sandboxing tool for Linux:
- Host filesystem mapping: The host root filesystem
/is bound directly into the sandbox (--bind / /). - Device node access: The host
/devdirectory is bind-mounted with device permissions enabled (--dev-bind /dev /dev), ensuring access to standard nodes like/dev/nulland pseudo-terminals (/dev/pts). - Home directory mapping: The user's home directory (
$HOME) is bind-mounted directly into the sandbox (--bind $HOME $HOME), making any new file/directory creations or deletions directly visible on the host. - Targeted isolation:
- If
~/.configexists, it is overlaid with atmpfs(--tmpfs $HOME/.config), and only whitelisted entries (by defaultgtk.*|git|nvim|gh|dconf|meld) are selectively bind-mounted back into the sandbox.
- If
You can configure the sandbox behavior when launching it:
-h,--help: Show the command help message.