config/shell: some formatting

This commit is contained in:
xeruf 2022-01-05 18:42:20 +01:00
parent cc54645159
commit e80992e33b
4 changed files with 28 additions and 27 deletions

View File

@ -57,5 +57,5 @@ map <leader>lw :setlocal colorcolumn=81 textwidth=80<CR>
map <leader>ln :setlocal colorcolumn= textwidth=0 wrap<CR>
" Quickly switch indentation settings
map <leader>t :setlocal shiftwidth=2 expandtab<CR>
map <leader>T :setlocal shiftwidth=3 tabstop=3 noexpandtab<CR>
map <leader>t :setlocal tabstop=2 expandtab<CR>
map <leader>T :setlocal tabstop=3 noexpandtab<CR>

View File

@ -16,7 +16,7 @@
},
"main": {
"lang": "auto",
"lastfolder": "/home/janek/data/music/Mixes",
"lastfolder": "/home/janek/data/music/Canto/Minecraft",
"maximized": false
},
"playlist": {
@ -43,7 +43,7 @@
"fontsize": 10,
"rowsize": 43,
"sort_fields": [
"__filename"
"__path"
],
"sort_reverse": false
},
@ -118,14 +118,15 @@
"$num(%track%,2) %title%",
"%title%"
],
"index": 3
"index": 0
},
"functions": {
"last_used": "regex"
},
"actions": {
"checked": [
"Standard"
"Standard",
"Artist splitting"
]
},
"quick_actions": {

View File

@ -37,23 +37,23 @@ gcn() {
# if in home or under XDG_CONFIG_HOME and not within a git directory, replace git by yadm
git() {
case "$1" in
reset) test "$2" = "--hard" && return 1;;
config) ;;
clone) ;;
*) case "$PWD" in
$HOME|$XDG_CONFIG_HOME|$LAST_YADM)
(reset) test "$2" = "--hard" && return 66;;
(config) ;;
(clone) ;;
(*) case "$PWD" in
($HOME|$XDG_CONFIG_HOME|$LAST_YADM)
yadm "$@"
return
return $?
;;
$XDG_CONFIG_HOME*|$HOME/.local*)
($XDG_CONFIG_HOME*|$HOME/.local*)
if ! command git rev-parse --show-toplevel &>/dev/null; then
export LAST_YADM="$PWD"
yadm "$@"
return
return $?
fi;;
esac;;
esac
command git "$@";
command git "$@"
}
# BRANCHES

View File

@ -64,12 +64,12 @@ formatsongs() {
do builtin cd $d && findsongs | formatin
done
)
IFS=$'\n'
for f in $(find "$@" -name "*.wav"); do
echo "Converting $f to ${f%.*}.flac"
ffmpeg -i "$f" "${f%.*}.flac" -v warning && mv -v $f /tmp
done
unset IFS
# fd --no-ignore-vcs --type f --extension opus --exec opusdec --quiet "{}" "{.}.wav" \; ".*" "$@"
find "$@" -type f -name "*.wav" -exec sh -c '
f="{}" &&
echo "Converting $f to ${f%.*}.flac" &&
ffmpeg -i "$f" "${f%.*}.flac" -v warning &&
mv -v "$f" /tmp' \;
}
# Normalize filenames for files given from stdin
@ -91,7 +91,7 @@ formatsong() {
s/ \(\..\{2,4\}\)$/\1/;
s/---/ - /;
s/^[0-9]\{6\}_//;
s/_/ /g;
s/\([^/]\)_/\1 /g;
s/ \././g;
s/ / /g;
s/\(\w\)+\(\w\)/\1 \2/g' -