Skip to content

Commit

Permalink
📝 Fills in missing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jefftriplett committed Mar 11, 2024
1 parent bd09001 commit 0d0f54e
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions home/.virtualenvs/postactivate
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ VIRTUAL_ENV_ENVRC="${VIRTUAL_ENV_SRC}/.envrc"
VIRTUAL_ENV_PYRIGHTCONFIG="${VIRTUAL_ENV_SRC}/pyrightconfig.json"
VIRTUAL_ENV_STIGNORE="${VIRTUAL_ENV_SRC}/.stignore"

# ------------------------------------------------------------
# Add /src/ to our .virtualenv's path
# ------------------------------------------------------------

if [ -d "${VIRTUAL_ENV_SRC}" ]; then
# If our {{virtualenv}}/src folder exists, CD into that folder
cd "${VIRTUAL_ENV_SRC}" || exit
Expand All @@ -19,6 +23,10 @@ else
add2virtualenv .
fi

# ------------------------------------------------------------
# Syncthing ".envrc" file...
# ------------------------------------------------------------

if ! [ -e "${VIRTUAL_ENV_ENVRC}" ]; then
# Create direnv file for our project
touch .envrc
Expand All @@ -37,7 +45,9 @@ if ! [ -e "${VIRTUAL_ENV_ENVRC}" ]; then
fi
fi

# Syncthing .stignore file...
# ------------------------------------------------------------
# Syncthing ".stignore" file...
# ------------------------------------------------------------

if ! [ -e "${VIRTUAL_ENV_STIGNORE}" ]; then
touch ${VIRTUAL_ENV_STIGNORE}
Expand Down Expand Up @@ -102,19 +112,29 @@ if ! [ -e "${PROJECT_FILE}" ]; then
fi
fi

# ------------------------------------------------------------
# Sublime Text LSP PyRight ".pyrightconfig.json" file...
# ------------------------------------------------------------

if ! [ -e "${VIRTUAL_ENV_PYRIGHTCONFIG}" ]; then
if ! [ -e jq ]; then
echo "Creating ${VIRTUAL_ENV_PYRIGHTCONFIG}"
echo "{\"venvPath\": \"/Users/jefftriplett/.virtualenvs\", \"venv\": \"${VIRTUAL_ENV_NAME}\"}" | jq > "${VIRTUAL_ENV_PYRIGHTCONFIG}"
fi
fi

# ------------------------------------------------------------
# Set our iTerm2 tab's title to our virtualenv name
# ------------------------------------------------------------

# `npm install -g iterm2-tab-set`
if ! [ -e tabset ]; then
npx iterm2-tab-set --title "${VIRTUAL_ENV_NAME}"
# bunx iterm2-tab-set --title "${VIRTUAL_ENV_NAME}"
tabset --title "${VIRTUAL_ENV_NAME}"
fi

# ------------------------------------------------------------

# Print our virtualenv's virtualenv name to the console
# `go install github.com/arsham/figurine@latest`
# if ! [ -e figurine ]; then
Expand Down

0 comments on commit 0d0f54e

Please sign in to comment.