summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-02-01 18:26:31 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-02-01 18:26:31 +0900
commitec89dd779ed67503678a752d2e0e68928183d831 (patch)
tree5e24a62c61cfc6c82ff1507e4b9d542a40b748e9
parenta9264a650765355014ce172e7b09bdf249f598dd (diff)
modified bin/gitupdate, created bin/webcam
-rwxr-xr-xar/.local/bin/gitupdate19
-rwxr-xr-xar/.local/bin/webcam16
2 files changed, 18 insertions, 17 deletions
diff --git a/ar/.local/bin/gitupdate b/ar/.local/bin/gitupdate
index fbb6ebe..72c5db6 100755
--- a/ar/.local/bin/gitupdate
+++ b/ar/.local/bin/gitupdate
@@ -72,25 +72,10 @@ repo_root=$(git rev-parse --show-toplevel || echo ".")
cd "$repo_root"
if [ "$repo_root" = "${PASSWORD_STORE_DIR:-${HOME}/.password-store}" ]; then
- if git remote | grep -q "^home$"; then
- # Push to both 'home' and 'origin'
- pass git push home "$branch" && pass git push origin "$branch"
- else
- # Push only to 'origin'
- pass git push origin "$branch"
- fi
+ pass git remote | xargs -L1 pass git push -all
else
- # Pull and rebase before pushing
git pull --rebase origin "$branch"
-
- # Check if the 'home' remote exists
- if git remote | grep -q "^home$"; then
- # Push to both 'home' and 'origin'
- git push home "$branch" && git push origin "$branch"
- else
- # Push only to 'origin'
- git push origin "$branch"
- fi
+ git remote | xargs -L1 git push -all
fi
printf "\n[repo] %s(%s): %s\n" "$(basename "$repo_root")" "$branch" "$message"
diff --git a/ar/.local/bin/webcam b/ar/.local/bin/webcam
new file mode 100755
index 0000000..8fcb724
--- /dev/null
+++ b/ar/.local/bin/webcam
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+case "$1" in
+-h | h | hflip) flip="--vf=lavfi=hflip" ;;
+-v | v | vflip) flip="--vf=lavfi=vflip" ;;
+-hv | hv | hvflip) flip="--vf=lavfi=hflip,vflip" ;;
+*) flip="" ;;
+esac
+
+mpv --untimed \
+ --no-cache \
+ --no-osc \
+ --no-input-default-bindings \
+ --profile=low-latency \
+ --input-conf=/dev/null \
+ --title=webcam "$flip" "$(find /dev -name 'video[02468]' 2>/dev/null | tail -n 1)"