From dff9e3cd9785948492b3b4148b95fdd5dcf41e4f Mon Sep 17 00:00:00 2001 From: "Mariano Z." Date: Tue, 18 Nov 2025 10:23:16 -0300 Subject: [PATCH] dev: automated commit - 2025-11-18 10:23:16 --- local-bin/.local/bin/dev-launcher | 13 ++++++--- sway/.config/sway/config.d/autostart | 2 +- zsh/.config/zsh/mise.zsh | 40 +++++++++++++--------------- 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/local-bin/.local/bin/dev-launcher b/local-bin/.local/bin/dev-launcher index bcc6c57..cfe25ea 100755 --- a/local-bin/.local/bin/dev-launcher +++ b/local-bin/.local/bin/dev-launcher @@ -3,7 +3,7 @@ set -euo pipefail # Configuration CACHE_MAX_AGE=300 -MRU_SIZE=20 +MRU_SIZE=5 # Debug logging (set DEBUG=1 to enable via environment variable) DEBUG="${DEBUG:-0}" @@ -114,18 +114,23 @@ sort_by_mru() { local all_repos="$1" local mru_list local temp_file - temp_file=$(mktemp) - [ -f "$MRU_FILE" ] && mru_list=$(cat "$MRU_FILE" | grep -v '^$') || mru_list="" + [ -f "$MRU_FILE" ] && mru_list=$(grep -v '^$' "$MRU_FILE") || mru_list="" + + # If MRU list is empty, just return sorted repos + if [ -z "$mru_list" ]; then + echo "$all_repos" | sort + return + fi # Output MRU items first with indicator echo "$mru_list" | sed 's/^/⭐ /' # Output non-MRU items using comm (fast set difference) + temp_file=$(mktemp) echo "$all_repos" | sort >"$temp_file.all" echo "$mru_list" | sort >"$temp_file.mru" comm -23 "$temp_file.all" "$temp_file.mru" 2>/dev/null || cat "$temp_file.all" - rm -f "$temp_file.all" "$temp_file.mru" } diff --git a/sway/.config/sway/config.d/autostart b/sway/.config/sway/config.d/autostart index 813f457..d7a3872 100644 --- a/sway/.config/sway/config.d/autostart +++ b/sway/.config/sway/config.d/autostart @@ -20,7 +20,7 @@ exec { $term --class="uy.com.mzunino" zen-twilight thunderbird - obsidian + # obsidian vesktop } diff --git a/zsh/.config/zsh/mise.zsh b/zsh/.config/zsh/mise.zsh index e78c1f9..d04f500 100644 --- a/zsh/.config/zsh/mise.zsh +++ b/zsh/.config/zsh/mise.zsh @@ -1,25 +1,21 @@ -# Lazy load mise activation (only initialize when mise is actually called) -# This saves ~50-100ms on every shell startup -mise() { - # Initialize mise only once - if ! which mise >/dev/null 2>&1; then - # Check if mise binary exists - if [[ -f ~/.local/bin/mise ]]; then - eval "$(~/.local/bin/mise activate zsh)" - else - # Install mise if missing - echo "Installing mise..." - mkdir -p ~/.local/bin - curl -s https://mise.jdx.dev/mise-latest-linux-x64 > ~/.local/bin/mise - chmod +x ~/.local/bin/mise - ~/.local/bin/mise install - eval "$(~/.local/bin/mise activate zsh)" - fi - # Set up completion after mise is initialized - compdef _mise mise 2>/dev/null - fi - command mise "$@" -} +# Activate mise during shell initialization for automatic toolchain switching +# This enables mise to automatically change toolchains when entering directories +if [[ -f ~/.local/bin/mise ]]; then + eval "$(~/.local/bin/mise activate zsh)" +elif command -v mise >/dev/null 2>&1; then + eval "$(mise activate zsh)" +else + # Install mise if missing + echo "Installing mise..." + mkdir -p ~/.local/bin + curl -s https://mise.jdx.dev/mise-latest-linux-x64 > ~/.local/bin/mise + chmod +x ~/.local/bin/mise + ~/.local/bin/mise install + eval "$(~/.local/bin/mise activate zsh)" +fi + +# Set up completion after mise is initialized +compdef _mise mise 2>/dev/null #compdef mise local curcontext="$curcontext"