diff --git a/buku_run b/buku_run
index 58faf98..f0bf25a 100755
--- a/buku_run
+++ b/buku_run
@@ -8,6 +8,8 @@ _rofi () {
switch_view="Alt+Tab"
new_bookmark="Alt+n"
actions="Alt+a"
+edit="Alt+e"
+delete="Alt+d"
# colors
help_color="#334433"
@@ -42,9 +44,9 @@ main () {
Use ${switch_view} to switch View. ${actions} for actions"
if [[ $mode == "bookmarks" ]]; then
content=$(buku -p -f 2 | awk 'NF == 2 { $0 = $0 "NOTAG" }; { $2 = substr($2,0,80); print $1"\t"$2"\t"$3,$4,$5 }' | column -t -s $'\t')
- menu=$(echo "${content}" | _rofi -p '> ' -filter "${filter}" -mesg "${HELP}" -kb-custom-1 "${new_bookmark}" -kb-custom-2 "${switch_view}" -kb-custom-3 "${actions}")
+ menu=$(echo "${content}" | _rofi -p '> ' -filter "${filter}" -mesg "${HELP}" -kb-custom-1 "${new_bookmark}" -kb-custom-2 "${switch_view}" -kb-custom-3 "${actions}" -kb-custom-4 "${edit}" -kb-custom-5 "${delete}")
elif [[ $mode == "tags" ]]; then
- menu=$(buku --np --st | awk '{$NF=""; print $0}' | cut -d ' ' -f2- | _rofi -p '> ' -mesg "${HELP}" -kb-custom-1 "${new_bookmark}" -kb-custom-2 "${switch_view}" -kb-custom-3 "${actions}")
+ menu=$(buku --np --st | awk '{$NF=""; print $0}' | cut -d ' ' -f2- | _rofi -p '> ' -mesg "${HELP}" -kb-custom-1 "${new_bookmark}" -kb-custom-2 "${switch_view}" -kb-custom-3 "${actions}" -kb-custom-4 "${edit}" -kb-custom-5 "${delete}")
fi
val=$?
if [[ $val -eq 1 ]]; then
@@ -53,6 +55,10 @@ Use ${switch_view} to switch View. ')
val=$?
if [[ $val -eq 1 ]]; then
@@ -185,12 +191,13 @@ editBookmark () {
exit
elif [[ $val -eq 0 ]]; then
if [[ $bmarkmenu == "http"* ]]; then
- buku -u "${id}" --url "${bookmark}"
+ buku -u "${id}" --url "${bmarkmenu}"
else
echo "" | rofi -e "Not a valid URI, Make sure URLs start with http"
editBookmark
fi
fi
+ mode=bookmarks main
}
addMark () {
diff --git a/config.buku b/config.buku
index 2e3a48d..9b2ef87 100644
--- a/config.buku
+++ b/config.buku
@@ -8,6 +8,8 @@ _rofi () {
switch_view="Alt+Tab"
new_bookmark="Alt+n"
actions="Alt+a"
+edit="Alt+e"
+delete="Alt+d"
# colors
help_color="#2d7ed8"