From b95620e460d80e1284b532a126479fd17ccfdf71 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Wed, 12 Jan 2022 12:44:28 +0100 Subject: [PATCH] bin: fix git-fork and more --- .local/bin/scripts/b | 2 +- .local/bin/scripts/git-fork | 8 ++++---- .local/bin/scripts/git-get | 2 +- README.org | 7 +++---- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.local/bin/scripts/b b/.local/bin/scripts/b index 6fe0fd8..ae4241c 100755 --- a/.local/bin/scripts/b +++ b/.local/bin/scripts/b @@ -109,7 +109,7 @@ if test "$timg"; then $(test $# -gt 1 && grid=$(expr $(tput cols) / \( 30 - $# \& $# \< 25 \| 5 \)) && echo "-t0.2 --center $(test $# -lt 30 && echo "--title") --grid=$((grid < $# ? grid : $#))x2") \ "${timg[@]}" "${timga[@]}" 2>/dev/null - if $inspect || test $# -lt 15; then + if $inspect || test $# -lt 10; then tput setaf 6 for img in "${timg[@]}" do ident="$(identify -ping -precision 3 -format "%wx%h %b %m %[bit-depth]-bit %[colorspace]" "$img")" diff --git a/.local/bin/scripts/git-fork b/.local/bin/scripts/git-fork index d1cb1d5..59c03c1 100755 --- a/.local/bin/scripts/git-fork +++ b/.local/bin/scripts/git-fork @@ -9,9 +9,9 @@ if test -d ".git" then repo="$(basename "$PWD")" git remote set-url origin "$(git-repo "${3:-github.com}" "$repo" "$2" "${@:4}")" -else repo="$1" - git-get "${3:-github.com}" "$repo" "$2" "${@:4}" - cd $(expr "$5" \| "$1") +else repo="$1" && shift + git-get "${3:-github.com}" "$repo" "${2:-$(git config --get user.name)}" "${@:4}" + cd "$(expr "$4" \| "$repo")" fi -test "$1" && git remote add upstream "$(git-repo "${3:-github.com}" "$repo" "$1")" +test -n "$1" && git remote add upstream "$(git-repo "${3:-github.com}" "$repo" "$1")" git remote -v diff --git a/.local/bin/scripts/git-get b/.local/bin/scripts/git-get index a43f96a..21070e6 100755 --- a/.local/bin/scripts/git-get +++ b/.local/bin/scripts/git-get @@ -1,8 +1,8 @@ #!/bin/sh # Clones from resolving the arguments and switches into the new directory +# ARGS see git-repo set -e remote=$(git-repo "$@") echo "Cloning $remote" git clone $remote ${@:4} --recurse-submodules cd "$(test -n "$2" && echo "$2" || basename ${remote%.git})" -exec "$SHELL" diff --git a/README.org b/README.org index fbf1a2c..a136ad3 100644 --- a/README.org +++ b/README.org @@ -46,18 +46,17 @@ git clone https://aur.archlinux.org/yay.git /tmp/yay cd /tmp/yay makepkg -si #+end_src -- aur recommendations :: tldr++ sc-im espanso [[https://github.com/mookid/diffr][diffr]] timg audiowaveform +- aur recommendations :: [[https://github.com/mookid/diffr][diffr]] tldr++ sc-im espanso timg audiowaveform python-dictcc - bluetooth :: bluez bluez-utils pulseaudio-bluetooth - git tools :: git-bug git-lfs git-crypt git-remote-gcrypt github-cli - pass :: pass pass-otp pass-extension-tail pass-clip -> interesting: pass-steam, pass-autotype, pass-file, pass-qr, pass-ssh, pass-rotate - ssh :: openssh sshfs lemonade-git - sync :: syncthing - : systemctl enable --now syncthing + : sudo systemctl enable --now syncthing - productivity :: activitywatch-bin jrnl - personal aur utils (only useful with dotfiles) :: bat-extras neovim-symlinks stderred-git - rdictcc-git - : pip install beautifulsoup4 +- needs extra setup :: rdictcc-git - experiments :: kakoune ** Graphical - office :: libreoffice-fresh