From a219353152bd41c57a1a3f7c1cc301016fe96a13 Mon Sep 17 00:00:00 2001 From: dmarakom6 Date: Sun, 28 Mar 2021 12:39:18 +0300 Subject: [PATCH] hidden utils --- util/.hidden/.clearlogs.sh | 19 +++++++++++++++++++ util/.hidden/.resetshellnotes.sh | 21 +++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 util/.hidden/.clearlogs.sh create mode 100644 util/.hidden/.resetshellnotes.sh diff --git a/util/.hidden/.clearlogs.sh b/util/.hidden/.clearlogs.sh new file mode 100644 index 0000000..ab4e51b --- /dev/null +++ b/util/.hidden/.clearlogs.sh @@ -0,0 +1,19 @@ +:<<'info' +shellnotes - .clearlogs.sh +(C) Dimitris Marakomihelakis +Released under the "All rights reserved" category. See the RIGHTS.txt file +in /docs/github/ for its full text. +info + +function clearlogs() { + dir="$(pwd)" + echo -n "Are you sure? " && read input + case $input in Y|Yes|yes|y|YES ) + cd ~/.shellnotes/logs + g++ .clearlogs.cpp -o clearlogs + ~/.shellnotes/logs/clearlogs + rm -f clearlogs + echo "[shellnotes] Logfiles cleared." + esac + cd $dir +} \ No newline at end of file diff --git a/util/.hidden/.resetshellnotes.sh b/util/.hidden/.resetshellnotes.sh new file mode 100644 index 0000000..259dc32 --- /dev/null +++ b/util/.hidden/.resetshellnotes.sh @@ -0,0 +1,21 @@ +:<<'info' +shellnotes - .resetshellnotes.sh +(C) Dimitris Marakomihelakis +Released under the "All rights reserved" category. See the RIGHTS.txt file +in /docs/github/ for its full text. +info + +function resetshellnotes() { + echo "Be aware that this command will erase shellnotes' memory." + echo "This contains default editors and folder, logfiles and user data and cache." + echo "Your Notes will not be removed." + echo -n "Proceed? " && read input + case $input in y|Yes|Y|YES|yes) + echo "y\n" | clearlogs >/dev/null + echo "" > ~/.shellnotes/util/listnotes/output/* + echo "/usr/bin/gedit" > ~/.shellnotes/util/sd/sd-input1.txt + echo "/bin/nano"> ~/.shellnotes/util/sd/sd-input2.txt + echo "~/Notes" > ~/.shellnotes/util/sd/sd-input3.txt + esac + return 0 +} \ No newline at end of file