actually I wasn't kidding It's Time FOr Fish
parent
0112f2231f
commit
025907fda1
|
@ -1,17 +1,17 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/fish
|
||||||
|
|
||||||
filter='pan=mono|c0=0.5*FL+-0.5*FR,silenceremove=start_periods=1:detection=peak'
|
set filter 'pan=mono|c0=0.5*FL+-0.5*FR,silenceremove=start_periods=1:detection=peak'
|
||||||
|
|
||||||
for f in $@
|
for f in $argv
|
||||||
do
|
set out (ffmpeg -nostdin -loglevel error -i "$f" -filter_complex "$filter" -t 0.00002 -f crc -)
|
||||||
out=$(ffmpeg -nostdin -loglevel error -i "$f" -filter_complex "$filter" -t 0.00002 -f crc -)
|
|
||||||
|
|
||||||
if [[ "$out" != 'CRC=0x00000001' ]]
|
if test "$out" != 'CRC=0x00000001'
|
||||||
then
|
set other /tmp/(basename "$f")
|
||||||
other="${f%.ogg}.1.ogg"
|
|
||||||
echo "$f is stereo, converting"
|
echo "$f is stereo, converting"
|
||||||
ffmpeg -i "$f" -ac 1 "$other" && mv "$other" "$f"
|
ffmpeg -i "$f" -ac 1 "$other" && mv "$other" "$f"
|
||||||
fi
|
else
|
||||||
done
|
echo "$f is mono"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
## EOF
|
## EOF
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/fish
|
||||||
|
|
||||||
fail() {
|
function fail
|
||||||
echo "failed to process $f, exiting"
|
echo "failed to process $f, exiting"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
end
|
||||||
|
|
||||||
for f in ./*.flac
|
for f in ./*.flac
|
||||||
do
|
ffmpeg -i "$f" -q:a 0 -vn (basename "$f" ".flac")".mp3"
|
||||||
ffmpeg -i "$f" -q:a 0 -vn "$(basename "$f" .flac).mp3"
|
or fail
|
||||||
(( $? )) && fail
|
|
||||||
echo "$f success"
|
echo "$f success"
|
||||||
done
|
end
|
||||||
|
|
||||||
read -rep "success. delete files? [yn] " YN
|
read -P "success. delete files? [yn] " yn
|
||||||
[[ ${YN,,} == y* ]] && rm ./*.flac
|
|
||||||
|
test $yn = y
|
||||||
|
and rm ./*.flac
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/fish
|
||||||
|
|
||||||
megadl $(cat ~/dl)
|
megadl (cat ~/dl)
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
export PATH=$HOME/.local/bin:$HOME/.gem/ruby/2.6.0/bin:$PATH
|
export PATH="$HOME/.local/bin":"$HOME/.gem/ruby/2.6.0/bin":$PATH
|
||||||
export DOOMWADDIR=/mnt/d/Stuff/GamesPC/IWads
|
export DOOMWADDIR='/mnt/d/Stuff/GamesPC/IWads'
|
||||||
|
|
||||||
|
## EOF
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/fish
|
||||||
|
|
||||||
export spectacleargs=-a
|
source "$HOME/src/scripts/sharenix.sh"
|
||||||
|
run_spectacle -a
|
||||||
. "$HOME/src/scripts/sharenix.sh"
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/fish
|
||||||
|
|
||||||
export spectacleargs=-f
|
source "$HOME/src/scripts/sharenix.sh"
|
||||||
|
run_spectacle -f
|
||||||
. "$HOME/src/scripts/sharenix.sh"
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/fish
|
||||||
|
|
||||||
export spectacleargs=-r
|
source "$HOME/src/scripts/sharenix.sh"
|
||||||
|
run_spectacle -r
|
||||||
. "$HOME/src/scripts/sharenix.sh"
|
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/fish
|
||||||
|
|
||||||
f=$HOME/Pictures/$(date "+%y%m%d-%H%M%S").png
|
function run_spectacle
|
||||||
|
set f "$HOME/Pictures/"(date "+%y%m%d-%H%M%S")".png"
|
||||||
|
|
||||||
spectacle -b $spectacleargs -n -o $f
|
spectacle -b $argv -n -o "$f"
|
||||||
|
|
||||||
if [[ -f "$f" ]]
|
if test -f "$f"
|
||||||
then
|
sharenix -n -s Greyserv "$f"
|
||||||
sharenix -n -s Greyserv "$f"
|
end
|
||||||
fi
|
|
||||||
|
|
||||||
rm "$f"
|
rm "$f"
|
||||||
|
end
|
||||||
|
|
|
@ -1,51 +1,49 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/fish
|
||||||
|
|
||||||
pull_plugins() {
|
|
||||||
local res
|
|
||||||
|
|
||||||
|
function pull_plugins
|
||||||
for plugin in ./*
|
for plugin in ./*
|
||||||
do
|
|
||||||
cd $plugin
|
cd $plugin
|
||||||
|
|
||||||
|
git stash
|
||||||
git pull -f
|
git pull -f
|
||||||
|
|
||||||
res=$?
|
set res $status
|
||||||
|
|
||||||
|
if test $res != 0; and test $res != 128
|
||||||
|
|
||||||
if [[ $res -ne 0 ]] && [[ $res -ne 128 ]]
|
|
||||||
then
|
|
||||||
echo "error $res in $PWD"
|
echo "error $res in $PWD"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
end
|
||||||
|
|
||||||
if [[ $plugin = ./base16-vim ]]
|
if test "$plugin" = ./base16-vim
|
||||||
then
|
|
||||||
echo "fixing attrs for $plugin"
|
echo "fixing attrs for $plugin"
|
||||||
sed -i '/Base16hi/! s/a:\(attr\|guisp\)/l:\1/g' colors/*.vim
|
sed -i '/Base16hi/! s/a:\(attr\|guisp\)/l:\1/g' colors/*.vim
|
||||||
fi
|
end
|
||||||
|
|
||||||
if [[ -d doc ]]
|
if test -d doc
|
||||||
then
|
|
||||||
echo "generating tags for $PWD"
|
echo "generating tags for $PWD"
|
||||||
vim --cmd "helptags doc/" --cmd "q"
|
vim --cmd "helptags doc/" --cmd "q"
|
||||||
fi
|
end
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
done
|
end
|
||||||
}
|
end
|
||||||
cd_and_pull() {
|
|
||||||
cd $1
|
function cd_and_pull
|
||||||
|
cd $argv[1]
|
||||||
pull_plugins
|
pull_plugins
|
||||||
cd ..
|
cd ..
|
||||||
}
|
end
|
||||||
|
|
||||||
cd ~/.vim/pack
|
cd ~/.vim/pack
|
||||||
|
|
||||||
for folder in ./*
|
for folder in ./*
|
||||||
do
|
|
||||||
cd $folder
|
cd $folder
|
||||||
|
|
||||||
[[ -d start ]] && cd_and_pull start
|
test -d start; and cd_and_pull start
|
||||||
[[ -d opt ]] && [[ $1 = opt ]] && cd_and_pull opt
|
test -d opt; and test $1 = opt; and cd_and_pull opt
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
done
|
end
|
||||||
|
|
||||||
|
## EOF
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/fish
|
||||||
|
|
||||||
while [[ 1 ]]
|
while true
|
||||||
do
|
|
||||||
x11vnc -forever -scale 0.25
|
x11vnc -forever -scale 0.25
|
||||||
done
|
end
|
||||||
|
|
|
@ -6,8 +6,11 @@ if status is-interactive
|
||||||
end
|
end
|
||||||
|
|
||||||
function fish_prompt
|
function fish_prompt
|
||||||
set_color purple
|
echo (set_color purple)"$hostname% "
|
||||||
echo (hostname)"% "
|
end
|
||||||
|
|
||||||
|
function fish_right_prompt
|
||||||
|
echo (set_color green)(pwd)
|
||||||
end
|
end
|
||||||
|
|
||||||
function fish_greeting
|
function fish_greeting
|
||||||
|
|
Loading…
Reference in New Issue