From f114c6134895dc2f23a10215283b091038e56f90 Mon Sep 17 00:00:00 2001 From: Antonin Ruan Date: Thu, 30 Apr 2026 07:54:02 -0400 Subject: [PATCH] Better venv aliase and emacs config updates --- .aliases | 25 +++++++++++++++++++++++-- .config/doom/config.el | 8 ++++++++ .config/doom/init.el | 6 +++--- 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/.aliases b/.aliases index 519d87f..618655a 100644 --- a/.aliases +++ b/.aliases @@ -19,7 +19,6 @@ alias ls='ls --color=tty' alias lsa='ls -lah' alias md='mkdir -p' alias rd=rmdir -alias venv='source .env/bin/activate' alias which-command=whence alias copy="xclip -selection clipboard" alias mkcdir='f() { md $1; cd $1 }; f' @@ -36,4 +35,26 @@ alias mssh="mosh --ssh='kitten ssh'" alias mussh="mosh --ssh='kitten ssh -o StrictHostKeyChecking=no'" alias gf2="/usr/bin/gf2 &> /dev/null &" alias qemu-monitor="telnet 127.0.0.1 7777" -alias sudo="/usr/bin/sudo" \ No newline at end of file +alias sudo="/usr/bin/sudo" + +function venv () { + VENV_DIR="" + + if [ -d .env ] ; then + VENV_DIR=".env" + elif [ -d .venv ]; then + VENV_DIR=".venv" + elif [ -d env ] ; then + VENV_DIR="env" + elif [ -d venv ] ; then + VENV_DIR="venv" + fi + + if [[ -z "$VENV_DIR" ]]; then + echo "Error: no virtual venv directory found" + return + fi + + echo "Activating $VENV_DIR" + source "${VENV_DIR}/bin/activate" +} diff --git a/.config/doom/config.el b/.config/doom/config.el index 856920c..c5e82df 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -176,3 +176,11 @@ (setq treesit-language-source-alist '((typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src" nil nil) (tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src" nil nil)))) + +;; Buffer display name +(with-eval-after-load 'uniquify + (setq uniquify-buffer-name-style 'post-forward-angle-brackets)) + +;; Config ido +(with-eval-after-load 'ido + (setq ido-max-window-height 5)) diff --git a/.config/doom/init.el b/.config/doom/init.el index 9cfa6dd..072a0ac 100644 --- a/.config/doom/init.el +++ b/.config/doom/init.el @@ -40,17 +40,17 @@ minimap ; show a map of the code on the side modeline ; snazzy, Atom-inspired modeline, plus API ;;nav-flash ; blink cursor line after big motions - neotree ; a project drawer, like NERDTree for vim + ;;neotree ; a project drawer, like NERDTree for vim ophints ; highlight the region an operation acts on (popup +defaults) ; tame sudden yet inevitable temporary windows ;;smooth-scroll ; So smooth you won't believe it's not butter ;;tabs ; a tab bar for Emacs - ;;treemacs ; a project drawer, like neotree but cooler + treemacs ; a project drawer, like neotree but cooler ;;unicode ; extended unicode support for various languages (vc-gutter +pretty) ; vcs diff in the fringe vi-tilde-fringe ; fringe tildes to mark beyond EOB ;;window-select ; visually switch windows - workspaces ; tab emulation, persistence & separate workspaces + ;;workspaces ; tab emulation, persistence & separate workspaces ;;zen ; distraction-free coding or writing :editor