dev: automated commit - 2025-11-10 11:45:17
This commit is contained in:
parent
572e1e1ced
commit
2b8553adcc
1 changed files with 28 additions and 28 deletions
|
|
@ -13,7 +13,7 @@ DEV_DIR=""
|
|||
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--help|-h)
|
||||
--help | -h)
|
||||
cat <<EOF
|
||||
Usage: $0 [DEV_DIR] [OPTIONS]
|
||||
|
||||
|
|
@ -58,10 +58,10 @@ find_git_repos() {
|
|||
fi
|
||||
|
||||
if command -v fd >/dev/null 2>&1; then
|
||||
fd -H -t d "^\.git$" "$DEV_DIR" -d 3 -0 | xargs -0 -n1 dirname | sort -u > "$CACHE_FILE"
|
||||
fd -H -t d "^\.git$" "$DEV_DIR" -d 3 -0 | xargs -0 -n1 dirname | sort -u >"$CACHE_FILE"
|
||||
else
|
||||
find "$DEV_DIR" -maxdepth 3 -type d -name ".git" -print0 | \
|
||||
xargs -0 -n1 dirname | sort -u > "$CACHE_FILE"
|
||||
find "$DEV_DIR" -maxdepth 3 -type d -name ".git" -print0 |
|
||||
xargs -0 -n1 dirname | sort -u >"$CACHE_FILE"
|
||||
fi
|
||||
cat "$CACHE_FILE"
|
||||
}
|
||||
|
|
@ -77,9 +77,9 @@ update_mru() {
|
|||
local temp_file
|
||||
temp_file=$(mktemp)
|
||||
|
||||
echo "$selected" > "$temp_file"
|
||||
[ -f "$MRU_FILE" ] && grep -vFx "$selected" "$MRU_FILE" >> "$temp_file" || true
|
||||
head -n "$MRU_SIZE" "$temp_file" > "$MRU_FILE"
|
||||
echo "$selected" >"$temp_file"
|
||||
[ -f "$MRU_FILE" ] && grep -vFx "$selected" "$MRU_FILE" >>"$temp_file" || true
|
||||
head -n "$MRU_SIZE" "$temp_file" >"$MRU_FILE"
|
||||
rm -f "$temp_file"
|
||||
}
|
||||
|
||||
|
|
@ -96,8 +96,8 @@ sort_by_mru() {
|
|||
echo "$mru_list" | sed 's/^/⭐ /'
|
||||
|
||||
# Output non-MRU items using comm (fast set difference)
|
||||
echo "$all_repos" | sort > "$temp_file.all"
|
||||
echo "$mru_list" | sort > "$temp_file.mru"
|
||||
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"
|
||||
|
|
@ -131,7 +131,7 @@ SELECTED_DISPLAY=$(echo "$SORTED_LIST" | tofi \
|
|||
--border-width 2 \
|
||||
--outline-width 0 \
|
||||
--font "$(fc-match -f '%{family}' 2>/dev/null || echo 'sans')" \
|
||||
--font-size 14 \
|
||||
--font-size 16 \
|
||||
--background-color '#191724' \
|
||||
--text-color '#e0def4' \
|
||||
--selection-color '#31748f' \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue