Update the custom scripts

This commit is contained in:
foo-dogsquared 2019-09-22 02:30:07 +08:00
parent 425af13f1b
commit 55d1a2b80e
2 changed files with 28 additions and 1 deletions

View File

@ -8,17 +8,40 @@ https://github.com/foo-dogsquared/a-remote-repo-full-of-notes-of-things-i-do-not
This shell script is specifically written for my system.
Don't expect it to work out-of-the-box so please edit this script accordingly.
Options:
-h, --help - Shows the help section.
-p, --program - The path of the notes manager folder with the executable (`manager.py` inside of the folder).
-c, --config - The location of the config.
-t, --target - The target location of the notes.
"
LECTURES=${LECTURES_DIRECTORY:-"$HOME/Documents/lectures"}
TERM="alacritty" # binary name of your terminal emulator
# The default values
TEXTURE_NOTES_MANAGER="$HOME/texture-notes"
TARGET="$HOME"
CONFIG="$HOME/config.py"
while [[ $# -gt 0 ]]
do
case $1 in
-h|--help)
echo "$help_section"
exit 0;;
-p|--program)
TEXTURE_NOTES_MANAGER="$2"
shift
shift;;
-c|--config)
CONFIG="$2"
shift
shift;;
-t|--target)
TARGET="$2"
shift
shift;;
*)
shift;;
esac
@ -42,7 +65,7 @@ actions=$(echo "$options" | rofi -dmenu -p "What do you want to do for the lectu
if [[ $? != 0 ]]; then exit; fi
lecture_manager_cmd="python $LECTURES/manager.py --target $HOME "
lecture_manager_cmd="python $TEXTURE_NOTES_MANAGER/manager.py --target $TARGET --config $CONFIG "
notes_list=$(eval "$lecture_manager_cmd list :all:")
if [[ $actions == 'Create a new subject' ]]; then

View File

@ -6,6 +6,10 @@ i3-msg exit'
command=$(echo -e "$options" | rofi -dmenu -p "Select the command to execute.")
if [[ $? != 0 ]]; then
exit $?
fi
continue=$(echo -e "No\nYes" | rofi -dmenu -p "You really want to continue with '$command'?")
if [[ $continue == "Yes" ]]; then