https://github.com/scientifichackers/iterm-pyenv
Always be aware of the current python environment in iTerm's status bar
https://github.com/scientifichackers/iterm-pyenv
Last synced: 11 months ago
JSON representation
Always be aware of the current python environment in iTerm's status bar
- Host: GitHub
- URL: https://github.com/scientifichackers/iterm-pyenv
- Owner: scientifichackers
- Created: 2020-01-13T16:22:52.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-13T16:39:52.000Z (over 6 years ago)
- Last Synced: 2025-02-28T22:20:41.372Z (over 1 year ago)
- Language: Python
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# iTerm-pyenv
Shows the current python environment name in iTerm's status bar, saving precious space in the shell prompt area.

## Installation
1. Copy [`pyenv.py`](./pyenv.py) to the iTerm Scripts directory.
```bash
mkdir -p ~/Library/Application\ Support/iTerm2/Scripts/AutoLaunch
cp pyenv.py ~/Library/Application\ Support/iTerm2/Scripts/AutoLaunch
```
2. Add the following lines to `fish_prompt`
```bash
nano ~/.config/fish/functions/fish_prompt.fish
```
```fish
function fish_prompt
# set python env for iTerm
set py (pyenv version-name)
if set -q VIRTUAL_ENV
set py (basename $VIRTUAL_ENV)
end
iterm2_set_user_var py $py
##
....
end
```