summaryrefslogtreecommitdiff
path: root/ar/.local/bin
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-02-17 01:16:48 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-02-17 01:16:48 +0900
commit56575d73c9b53912ed1798692ef0888ae63197b7 (patch)
treef4b56575ae80b1000d64fae557c7bb497fcd4c92 /ar/.local/bin
parent003b44a1eb135ee56894632e64d37421da04bd9b (diff)
modified statusbar/sb-repos
Diffstat (limited to 'ar/.local/bin')
-rwxr-xr-xar/.local/bin/statusbar/sb-repos12
1 files changed, 8 insertions, 4 deletions
diff --git a/ar/.local/bin/statusbar/sb-repos b/ar/.local/bin/statusbar/sb-repos
index d5acfac..001ca89 100755
--- a/ar/.local/bin/statusbar/sb-repos
+++ b/ar/.local/bin/statusbar/sb-repos
@@ -57,11 +57,11 @@ check_multi_repo_status() {
[ "$unpushed" -gt 0 ] && status+="↑$unpushed"
[ "$unpulled" -gt 0 ] && status+="↓$unpulled"
status+=" "
- changed_repos+="$repo_dir"
+ changed_repos+="$repo_dir"$'\n'
fi
done < <(find "$dir" -mindepth 2 -maxdepth 2 -type d -name ".git" 2>/dev/null)
- printf "%s%s" "$status" "$changed_repos"
+ printf "%s %s" "$status" "$changed_repos"
}
# Function to check Git repository status for a single repository
@@ -101,7 +101,7 @@ private_status=$(check_multi_repo_status "$private_repos" "$private_icon" | awk
private_changes=$(check_multi_repo_status "$private_repos" "$private_icon" | awk -F' ' '{print $2}')
public_status=$(check_multi_repo_status "$public_repos" "$public_icon" | awk -F' ' '{print $1}')
-public_changes=$(check_multi_repo_status "$public_repos" "$public_icon" | awk -F' ' '{print $1}')
+public_changes=$(check_multi_repo_status "$public_repos" "$public_icon" | awk -F' ' '{print $2}')
[ -f /tmp/gitsync ] && rm -f /tmp/gitsync
@@ -118,7 +118,11 @@ output="${output%"${output##*[! ]}"}"
openrepos() {
all_changed_repos="$dotfiles_changes"$'\n'"$suckless_changes"$'\n'"$private_changes"$'\n'"$public_changes"
- [ -n "$all_changed_repos" ] && exec "$TERMINAL" -e opensessions "$(echo "$all_changed_repos" | grep -v '^$')"
+ repos_cleaned="$(echo "$all_changed_repos" | grep -v '^$')"
+
+ if [ -n "$repos_cleaned" ]; then
+ setsid -f "$TERMINAL" -e opensessions $repos_cleaned >/dev/null 2>&1
+ fi
}
# Handle button actions