From df4a2aa87fea4732f1b51c52ddd139d727807658 Mon Sep 17 00:00:00 2001 From: xerus2000 <27jf@pm.me> Date: Fri, 26 Jun 2020 23:21:22 +0200 Subject: [PATCH] .local/bin: Add focus & notes/writing scripts --- .local/bin/focus | 4 ++++ .local/bin/wr | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100755 .local/bin/focus create mode 100755 .local/bin/wr diff --git a/.local/bin/focus b/.local/bin/focus new file mode 100755 index 0000000..2649f19 --- /dev/null +++ b/.local/bin/focus @@ -0,0 +1,4 @@ +#!/bin/sh +playlistPath="$HOME/daten/music/Playlists" +vlc $(find $playlistPath -iname "Focus$1.m3u8" | grep . || find $playlistPath -iname "$1.m3u8") >/dev/null 2>&1 & + diff --git a/.local/bin/wr b/.local/bin/wr new file mode 100755 index 0000000..ac5907b --- /dev/null +++ b/.local/bin/wr @@ -0,0 +1,15 @@ +#!/bin/sh +p=$PWD +cd $HOME/daten/Dropbox/dokumente/notes +case $1 in +log) file=life/${2:-general};; +idea) file=idea/$2.md;; +write) file=writings/$2.md;; +*) file=$2.md;; +esac +comment=$(test -d $file && echo Edit || echo Create) +test "$3" && echo $3 >>$file || $EDITOR $file +git add $file +git commit -m "$comment $file" +git push +cd $p