local/bin: Update note & music playing scripts
This commit is contained in:
parent
ec48554533
commit
be4b3879a7
|
@ -36,7 +36,9 @@ edshell() {
|
||||||
}
|
}
|
||||||
|
|
||||||
edbin() {
|
edbin() {
|
||||||
$EDITOR "$( (command which $1 || find $HOME/.local/bin -name "$1*" | grep . -m 1 || echo "$HOME/.local/bin/$1") | tail -1 )"
|
file="$( (command which $1 || find $HOME/.local/bin -name "$1*" | grep . -m 1 || echo "$HOME/.local/bin/$1") | tail -1 )"
|
||||||
|
$EDITOR "$file"
|
||||||
|
yadm add "$file"
|
||||||
}
|
}
|
||||||
|
|
||||||
alias -g ___='"$(eval "$(fc -ln -1)" | tail -n 1)"'
|
alias -g ___='"$(eval "$(fc -ln -1)" | tail -n 1)"'
|
||||||
|
|
|
@ -2,5 +2,4 @@
|
||||||
MUSIC="$HOME/daten/music"
|
MUSIC="$HOME/daten/music"
|
||||||
playlistPath="$MUSIC/Playlists"
|
playlistPath="$MUSIC/Playlists"
|
||||||
result="$(test "$1" && (find $playlistPath -iname "focus-$1.m3u8" | grep . || find $playlistPath -iname "$1.m3u*" | grep . || find $MUSIC -iname "*$1*") || echo "$playlistPath/focus.m3u8" )"
|
result="$(test "$1" && (find $playlistPath -iname "focus-$1.m3u8" | grep . || find $playlistPath -iname "$1.m3u*" | grep . || find $MUSIC -iname "*$1*") || echo "$playlistPath/focus.m3u8" )"
|
||||||
killall -q vlc; sleep 1; vlc --qt-start-minimized --loop --random "$result" >/dev/null 2>&1 &
|
vp "$result"
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
p=$PWD
|
p=$PWD
|
||||||
cd $HOME/daten/Dropbox/dokumente/notes
|
cd $HOME/daten/Dropbox/dokumente/notes
|
||||||
|
loc=$1
|
||||||
case $1 in
|
case $1 in
|
||||||
log) shift; file=life/${1:-general}; date +%F >>$file;;
|
log|life) shift; file=journal/${1:-general}.txt; date +%F >>$file;;
|
||||||
idea) shift; file=ideas/${1:-general}.md;;
|
idea) shift; file=ideas/${1:-README}.md;;
|
||||||
|
box) shift; file=box/$1.md;;
|
||||||
write) shift; file=writings/$1.md;;
|
write) shift; file=writings/$1.md;;
|
||||||
msg) shift; file=archive/messages/$1.md;;
|
msg) shift; file=archive/messages/$1.md;;
|
||||||
*) file=${1:-README}.md;;
|
*) file=${1:-README}.md;;
|
||||||
esac
|
esac
|
||||||
comment=$(test -f $file && echo Edit || echo Create)
|
comment=$(test -f $file && echo Update || echo Create)
|
||||||
test "$3" && echo $3 >>$file || $EDITOR + $file
|
test "$2" && echo "$2" >>$file || $EDITOR + $file
|
||||||
git add $file && git commit -m "$comment $file" && git push
|
git add $file && git commit -m "$(test "$(dirname $file)" != "." && echo "${loc%%/*}: ")$comment $(basename $file)" && git push
|
||||||
cd $p
|
cd $p
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
killall -q vlc; sleep 1; vlc --qt-start-minimized --loop --random "$@" >/dev/null 2>&1 &
|
Loading…
Reference in New Issue