3 ms·
I sure do love it when a script runs in the background to poll a website I didn't give consent to, doing god knows what, all whilst innocuously pressing the ret
by tetris11 2y ago
I sure do love it when a script runs in the background to poll a website I didn't give consent to, doing god knows what, all whilst innocuously pressing the return key....
My PS1 is based on a 20 line prompt I saw on mastodon. It does git, virtualenv, conda, guix, and some path shortening. 20 lines.
https://mstdn.science/@mtekman/111861830339082890 https://mstdn.science/@mtekman/111861830339082890
- larodi 2y agoIs it fast,…? Cause all my attempts at keeping the Gcloud proj alongside git branch in the posh prompt failed miserably in terms of speed (…and on a very decent Ryzen 7 with NVME)
- tetris11 2y agoYes it is fast. It runs wholly within bash, sources no other scripts, completely legible, and is less than 20 lines of code.
- Joker_vD 2y agoI personally just settled on adding stuff into $debian_chroot; it's not what it was meant for, of course, but it means I don't have to customise my dotfiles. #!/bin/bash -e VIRTUAL_ENV="$(realpath "$1")" export VIRTUAL_ENV PATH="$VIRTUAL_ENV/bin:$PATH" export PATH unset PYTHONHOME venv="$(basename "$VIRTUAL_ENV")" if [ "$venv" = ".venv" ] ; then venv="$(basename "$(dirname "$VIRTUAL_ENV")")" fi if [ -n "$venv" ] ; then debian_chroot="$venv${debian_chroot:+|$debian_chroot}" export debian_chroot fi exec "$SHELL"