From cf6bd83b9bc3f739c755516706d6702dc2567550 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Fri, 2 Oct 2020 18:55:35 +0200 Subject: Added keyrepeat, ti ignore node_modules --- bin/tag-music | 38 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 27 deletions(-) (limited to 'bin') diff --git a/bin/tag-music b/bin/tag-music index 17d6aac..e801132 100755 --- a/bin/tag-music +++ b/bin/tag-music @@ -16,33 +16,17 @@ do for song_file in "$album_dir"/* do [ ! -f "$song_file" ] && continue - song="$(basename "$song_file" | cut -d '.' -f 1)" - # echo "$artist" - # echo "$album" - # echo "$song" - case "$song_file" in - *.ogg) - ;; - *.opus) - echo "OPUS: $song_file" - echo "Title=$song -Artist=$artist -Album=$album -Track= -Total= -Date= -Genre= -Comment=" | opustags -i -S "$song_file" - ;; - *.mp3) - id3tag --artist "$artist" --album "$album" --song "$song" "$songfile" - ;; - *.m4a) - id3tag --artist "$artist" --album "$album" --song "$song" "$songfile" - ;; - *) - ;; - esac + song="$(basename "$song_file" | rev | cut -d '.' -f 2- | rev)" + # echo $song_file + track=0 + if expr "$song" : "[0-9][0-9]*\-.*" > /dev/null + then + track="$(echo "$song" | cut -d '-' -f 1)" + song="$(echo "$song" | cut -d '-' -f 2-)" + fi + # echo $track $song + echo $song_file + taffy --artist "$artist" --album "$album" --title "$song" --track "$track" "$song_file" done done done -- cgit From c2f54cbb339434ac292d6422c94c8697c62cfcd2 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sun, 6 Dec 2020 22:04:04 +0100 Subject: Added xdg applications --- bin/bin | 1 + 1 file changed, 1 insertion(+) create mode 120000 bin/bin (limited to 'bin') diff --git a/bin/bin b/bin/bin new file mode 120000 index 0000000..4f8476b --- /dev/null +++ b/bin/bin @@ -0,0 +1 @@ +/home/charles/git/dotfiles/bin \ No newline at end of file -- cgit From a524b71f558dcdd4f050f3e3f8a1ad2eac7443bd Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sun, 13 Dec 2020 11:16:29 +0100 Subject: Improving feedback on clone with project-open, Updated shiftwidth=2 widht setlocal instead of set to avoid poluting the other buffers, Updated newsboat video stream with mpv to enable going forward/backward --- bin/project-open | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'bin') diff --git a/bin/project-open b/bin/project-open index 0dd5d31..955d31d 100755 --- a/bin/project-open +++ b/bin/project-open @@ -1,6 +1,7 @@ #!/bin/sh # shellcheck disable=SC2088 +# (tile does not expand in single quote) dest=$( find ~/git -mindepth 1 -maxdepth 1 -printf '%A@\t%f\n' | sort -r | @@ -15,7 +16,7 @@ dest_path="$HOME/git/$dest" if cd "$dest_path" 2> /dev/null then touch "$dest_path" - st + exec st else while [ -z "$choice" ] do @@ -27,16 +28,25 @@ else mkdir -p "$dest_path" cd "$dest_path" || exit 1 git init + exec st ;; + "clone") - url="$(echo '' | dmenu -p "Entry repository url: ")" - notify-send "Cloning $url to $dest_path" - git clone --recursive "$url" "$dest_path" || - (notify-send -u critical "Clone failed"; exit 1) - cd "$dest_path" || exit 1 + while [ -z "$remote_choice" ] + do + remote_choice=$(printf 'github.com\ncacharle.xyz\nother' | dmenu -p "Remote location") + done + case "$remote_choice" in + "github.com") prefix='git@github.com:cacharle/' ;; + "cacharle.xyz") prefix='git@cacharle.xyz:/srv/git/' ;; + "other") ;; + esac + url="$prefix$(echo "$dest" | dmenu -p "Enter repository url: $prefix")" + st -e /bin/sh -c "git clone --recursive '$url' '$dest_path' && cd '$dest_path' && exec $SHELL" || + notify-send -u critical "Could not clone $url in $dest_path" && exit 1 ;; + "cancel") exit ;; *) exit 1 ;; esac - st fi -- cgit