diff --git a/.Xmodmap##hostname.elephant-arch b/.Xmodmap##hostname.elephant similarity index 100% rename from .Xmodmap##hostname.elephant-arch rename to .Xmodmap##hostname.elephant diff --git a/.config/shell/functions b/.config/shell/functions index 54ee60c..435a777 100644 --- a/.config/shell/functions +++ b/.config/shell/functions @@ -210,10 +210,13 @@ sshl() { lemonade server -allow 127.0.0.1 & file="/var/tmp/ssh-$1" if test ! -e "$file"; then - ssh-copy-id -i "$(ssh -G "$1" | grep "^identityfile " | head -1 | cut -d " " -f2- | sed "s|^~|$HOME|")" "$1" && touch "$file" + if ! ssh -G "$1" | grep --silent "^user root$" && touch "$file"; then + ssh-copy-id -i "$(ssh -G "$1" | grep --max-count 1 "^identityfile " | cut -d " " -f2- | sed "s|^~|$HOME|")" "$1" && touch "$file" TERM=xterm-256color kitty +kitten ssh -R 2489:127.0.0.1:2489 "$@" - else TERM=xterm-256color ssh "$@" + return $? + fi fi + TERM=xterm-256color pass ssh "$@" } # Listen to loopback of mic diff --git a/.local/bin/scripts/b b/.local/bin/scripts/b index 492147a..1d97225 100755 --- a/.local/bin/scripts/b +++ b/.local/bin/scripts/b @@ -122,6 +122,7 @@ done # timg: images # timga: potentially viewable as image if test "$timg"; then + # Don't show info on all images for gifs $inspect || $elevate timg $(test "$timga" && echo "-V") --rotate=exif -g $(tput cols)x$(expr $(tput lines) / 2) \ $(test $# -gt 1 && grid=$(expr $(tput cols) / \( 30 - $# \& $# \< 25 \| 5 \)) && echo "-t0.2 --center $(test $# -lt 30 && echo "--title") --grid=$((grid < $# ? grid : $#))x2") \ diff --git a/.local/bin/scripts/git-repo b/.local/bin/scripts/git-repo index 2699233..0540159 100755 --- a/.local/bin/scripts/git-repo +++ b/.local/bin/scripts/git-repo @@ -13,5 +13,5 @@ case "$1" in (lab) host=git@gitlab.com;; (*) host=$1;; esac - echo "${host:-git.jfischer.org}:${3:-${user:-$(git config user.name)}}/${2:-$(basename $PWD)}.git" ;; + echo "${host:-gitea@git.jfischer.org}:${3:-${user:-$(git config user.name)}}/${2:-$(basename $PWD)}.git" ;; esac diff --git a/.local/bin/scripts/mp b/.local/bin/scripts/mp index 7cad834..525a9d7 100755 --- a/.local/bin/scripts/mp +++ b/.local/bin/scripts/mp @@ -7,10 +7,11 @@ PLAYLISTS="$MUSIC/Playlists" LINKS="$MUSIC/links" if test "$1" = "-r" then shift - test "$1" = "-v" && verbose=-v && shift + test "$1" = "-v" && verbose=-v && set -x && shift + # TODO this is sooo slow... for arg do filepath="$({ find "$(dirname -- "$arg")" -maxdepth 1 -name "$(basename -- "$arg")*" -exec realpath {} + || - arg-test find "$MUSIC/$(dirname -- "$arg")" "$MUSIC/Playlists/$(dirname -- "$arg")" -maxdepth 1 \ + find "$MUSIC/$(dirname -- "$arg")" "$MUSIC/Playlists/$(dirname -- "$arg")" -maxdepth 1 \ -name "$(basename -- "$arg")*" -exec realpath {} +; } 2>/dev/null)" test -n "$verbose" && echo "Scanning path '$filepath' $( test "$arg" != "$filepath" && echo "from '$arg' ")(MUSIC: '$MUSIC', PWD: '$PWD')" >&2