From 88cd0b90f0279085255f61fa4fcd1e32ba46942e Mon Sep 17 00:00:00 2001 From: Taeyeon Mori Date: Tue, 27 Sep 2016 21:21:02 +0200 Subject: [PATCH] Add start, remembersong utilities; Move animelib3 --- bin/{superseded => }/animelib3 | 0 bin/remembersong | 14 ++++++++++++++ bin/start | 7 +++++++ 3 files changed, 21 insertions(+) rename bin/{superseded => }/animelib3 (100%) create mode 100755 bin/remembersong create mode 100755 bin/start diff --git a/bin/superseded/animelib3 b/bin/animelib3 similarity index 100% rename from bin/superseded/animelib3 rename to bin/animelib3 diff --git a/bin/remembersong b/bin/remembersong new file mode 100755 index 0000000..27ad1dc --- /dev/null +++ b/bin/remembersong @@ -0,0 +1,14 @@ +#!/bin/sh +# Requires playerctl: http://dubstepdish.com/blog/2014/04/19/introducing-playerctl/ +# Useful when bound to a global Hotkey + +SongsFile="${1-$HOME/Documents/Songs.text}" + +Artist="$(playerctl metadata artist)" +Title="$(playerctl metadata title)" + + +echo "$Artist -- $Title" >>$SongsFile + +test -t 1 && Notify=echo || Notify=notify-send +$Notify "Remembered ´$Title´ by ´$Artist´ in ${SongsFile##*/}" diff --git a/bin/start b/bin/start new file mode 100755 index 0000000..5b1107a --- /dev/null +++ b/bin/start @@ -0,0 +1,7 @@ +#!/bin/sh +# Very simple background process launcher +# Launches command in background and voids all output + +"$@" >/dev/null 2>&1 & +disown +