소스 검색

dev: automated commit - 2025-11-18 10:23:16

Mariano Z. 2 달 전
부모
커밋
dff9e3cd97
3개의 변경된 파일28개의 추가작업 그리고 27개의 파일을 삭제
  1. 9 4
      local-bin/.local/bin/dev-launcher
  2. 1 1
      sway/.config/sway/config.d/autostart
  3. 18 22
      zsh/.config/zsh/mise.zsh

+ 9 - 4
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"
 }
 

+ 1 - 1
sway/.config/sway/config.d/autostart

@@ -20,7 +20,7 @@ exec {
     $term --class="uy.com.mzunino"
     zen-twilight
     thunderbird
-    obsidian
+    # obsidian
     vesktop
 }
 

+ 18 - 22
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"