diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-07-12 14:56:14 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-07-12 14:56:14 +0200 |
commit | a4c01b0831d11775d46d1dca00b528397cbf4b03 (patch) | |
tree | 4b3ef69cb688a9db0b4d7b527f4ffa90dd5ceb2e | |
parent | cc58700ad2483cd7ff8c9b56c0a77fc492808c01 (diff) | |
parent | 320b7ed28d5b142d208f03a3e2f851bec9e1a678 (diff) |
Merge branch 'main' of db:dotfiles
-rwxr-xr-x | bin/common/gt | 3 | ||||
-rwxr-xr-x | bin/common/gt-cmd | 8 | ||||
-rwxr-xr-x | bin/common/ytclipo | 5 | ||||
-rwxr-xr-x | bin/extra/ytplay | 7 | ||||
-rw-r--r-- | config/essentials/shell/aliases.sh | 2 |
5 files changed, 12 insertions, 13 deletions
diff --git a/bin/common/gt b/bin/common/gt index 477adfc..1965ed1 100755 --- a/bin/common/gt +++ b/bin/common/gt @@ -85,7 +85,7 @@ while getopts ":a:c:f:lsheu" opt; do while read -r repo remote_url; do gt-sync "$repo" "$remote_url" done <"$repos" - fi | awk -F ':' '/x$/ {print $1}' | + fi | awk -F ':' '/x$/ {print $1}' | sed "s@~@$HOME@" | if [ "$parallel" ]; then parallel gt-cmd {} pull else @@ -103,5 +103,6 @@ while getopts ":a:c:f:lsheu" opt; do ;; esac done +>&2 printf '*: %s\n' "$*" # eval "herbe $(status | sed 's/"/\"/g;s/.*/"&"/' | tr '\n' ' ')" diff --git a/bin/common/gt-cmd b/bin/common/gt-cmd index 66efd50..faa743a 100755 --- a/bin/common/gt-cmd +++ b/bin/common/gt-cmd @@ -2,9 +2,11 @@ # path to repo repo="$1" +shift 2>/dev/null || exit 1 # git command -command="$2" -[ "$#" -lt 2 ] && exit 1 +command="$1" +shift 2>/dev/null || exit 1 +args="$*" repo_pretty="$(printf '%s' "$repo" | sed "s@^$HOME@~@")" @@ -13,6 +15,6 @@ if [ ! -d "$repo" ]; then exit 1 fi -git -C "$repo" "$command" >/dev/null 2>&1 +git -C "$repo" "$command" $args >/dev/null 2>&1 [ $? -gt 0 ] && s="x" || s="o" printf '%s: %s\n' "$repo_pretty" "$s" diff --git a/bin/common/ytclipo b/bin/common/ytclipo index b11f84a..4d9d846 100755 --- a/bin/common/ytclipo +++ b/bin/common/ytclipo @@ -1,13 +1,14 @@ #!/bin/sh -inp="$(ytlink)" +inp="$1" +[ -z "$inp" ] && inp="$(ytlink)" +[ "$inp" ] || exit 1 >&2 printf "inp: %s\n" "$inp" notify-send "ytclipo" "$inp" || : yt-dlp "$inp" \ --restrict-filenames \ --embed-chapters \ - -f "b" \ -S "res:1080" \ -P "$HOME/vids/youtube/" \ -o "%(channel)s/%(title)s.%(ext)s" diff --git a/bin/extra/ytplay b/bin/extra/ytplay index 4b23732..005cc2d 100755 --- a/bin/extra/ytplay +++ b/bin/extra/ytplay @@ -1,9 +1,4 @@ #!/bin/sh url="$(ytlink)" herbe "playing: $url" & -yt-dlp "$url" \ - --embed-chapters \ - -f "b" \ - -S "res:1080" \ - -o - | - mpv - +yt-dlp -S "res:1080" -o - "$url" | mpv - diff --git a/config/essentials/shell/aliases.sh b/config/essentials/shell/aliases.sh index 291640d..bb2d6a9 100644 --- a/config/essentials/shell/aliases.sh +++ b/config/essentials/shell/aliases.sh @@ -281,7 +281,7 @@ alias god='cd "$(find . -mindepth 1 -maxdepth 1 -type d | fzf)"' alias gov='go ~/vids d' # fzf aliases -alias ppj='cd ~/proj/personal/"$(find ~/proj/personal -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | fzf)"' +alias ppj='cd ~/proj/"$(find ~/proj -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | fzf)"' alias ppjs='cd ~/proj/personal/scripts/"$(find ~/proj/personal/scripts -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | fzf)"' alias scr='edit_in_dir ~/proj/personal/scripts/' alias fil='edit_in_dir ~/docs/filios/' |