diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-02-11 09:21:30 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-02-11 09:21:30 +0900 |
| commit | 637eaf89ba69d8e4ff49d3d5253f1f97ffb0c86c (patch) | |
| tree | a286c6ee22fabb20ef7501fad05d88d751adca35 | |
| parent | 59ef85d49f91e8588885f575f8f9238c0eccd8b2 (diff) | |
modified bin/gitupdate, modified bin/xdotmouse
| -rwxr-xr-x | ar/.local/bin/gitupdate | 14 | ||||
| -rwxr-xr-x | ar/.local/bin/xdotmouse | 8 |
2 files changed, 11 insertions, 11 deletions
diff --git a/ar/.local/bin/gitupdate b/ar/.local/bin/gitupdate index 8205e48..4fed27e 100755 --- a/ar/.local/bin/gitupdate +++ b/ar/.local/bin/gitupdate @@ -43,6 +43,13 @@ unpushed=$(git cherry -v | wc -l) [ -z "$changes" ] && [ "$unpushed" -eq 0 ] && exit +# Save current directory and change to the Git repo root +repo_root=$(git rev-parse --show-toplevel || echo ".") +cd "$repo_root" || exit + +# Get the current Git branch name +branch=$(git symbolic-ref -q HEAD | sed -e 's|^refs/heads/||') + # Generate default commit message if there are changes if [ -n "$changes" ] && [ "$unpushed" -eq 0 ]; then num_changes=$(echo "$changes" | wc -l) @@ -64,13 +71,6 @@ else message=$(git cherry -v | awk '{$1=$2=""; print $0}' | sed 's/^ *//' | tail -n 1) fi -# Get the current Git branch name -branch=$(git symbolic-ref -q HEAD | sed -e 's|^refs/heads/||') - -# Save current directory and change to the Git repo root -repo_root=$(git rev-parse --show-toplevel || echo ".") -cd "$repo_root" - if [ "$repo_root" = "${PASSWORD_STORE_DIR:-${HOME}/.password-store}" ]; then pass git remote | xargs -L1 pass git push --all else diff --git a/ar/.local/bin/xdotmouse b/ar/.local/bin/xdotmouse index 08c8226..43e1a0d 100755 --- a/ar/.local/bin/xdotmouse +++ b/ar/.local/bin/xdotmouse @@ -1,13 +1,13 @@ #!/bin/sh -speed="5" +speed="10" case "$1" in h) xdotool mousemove_relative -- -$speed 0 ;; j) xdotool mousemove_relative 0 $speed ;; k) xdotool mousemove_relative -- 0 -$speed ;; l) xdotool mousemove_relative $speed 0 ;; -c) xdotool click 1 ;; -C) xdotool click --repeat 1 ;; -r) xdotool click 2 ;; +c) xdotool click --clearmodifiers 1 ;; +C) xdotool click --clearmodifiers --repeat 2 1 ;; +m) xdotool click --clearmodifiers 2 ;; esac |
