rahriver / rofi-noter

Create and view notes inside the Rofi application launcher.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some minor suggestions

shivanshu-semwal opened this issue · comments

You can move the config at the top of script to a separate config file. Use something like yaml or json.
And use array for options. For e.g.

selected_dir=$(echo -e " Create Note\n View Notes\n Library\n Articles\n Download Books" | rofi -dmenu -i -p " Choose an action:")
declare -a options=(
    "Create Note"
    "View Notes"
    "Library"
    "Articles" 
    "Download Books"
)
selected_dir=$(printf '%s\n' "${options[@]}"| rofi -dmenu -i -p " Choose an action:")

Also when showing items in rofi, remove these form these from prefix, and append after selection.
Show only the part after the path.

book_library="<path_to_your_book_library>"
note_library="<path_to_your_note_library>"
article_library="<path_to_your_article_library>"

That's a great suggestion, thank you for that! I will make those changes.