https://github.com/frap129/snv
Switch eNVironment (a menu to change distrobox containers)
https://github.com/frap129/snv
Last synced: over 1 year ago
JSON representation
Switch eNVironment (a menu to change distrobox containers)
- Host: GitHub
- URL: https://github.com/frap129/snv
- Owner: frap129
- License: gpl-3.0
- Created: 2023-12-16T04:25:12.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-22T18:34:15.000Z (about 2 years ago)
- Last Synced: 2025-01-23T22:35:26.447Z (over 1 year ago)
- Language: Shell
- Size: 318 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# snv (Switch eNVironment)
`snv` is a script that lets you choose a shell environment from a list of your distrobox containers + your host.
If `snv` is installed somewhere in your home directory and is in your path, it works both on host and in a container.

### Preview
The command used to generate the preview is customizable using environment variables.
| Variable | Default Value |
|-----------|----------------------------------------------------------------|
| HOST_PREV | `cat /etc/hostname` |
| ENV_PREV | `distrobox list \| head -n 1 && distrobox list \| grep ' {}'"` |
As an example, to generate a simple preview for the host with neofetch, export
`HOST_PREV="neofetch --backend off --color_blocks off"`
Dependencies:
- distrobox
- fzf
### Setup completions
Completions for BASH and ZSH are included in `snv`. Simply `source ~/.local/bin/snv` (or whatever path you installed it to) in your `~/.bashrc` or `~/.zshrc` respevtively