@@ -8,6 +8,8 @@ _rofi () {
8
8
switch_view=" Alt+Tab"
9
9
new_bookmark=" Alt+n"
10
10
actions=" Alt+a"
11
+ edit=" Alt+e"
12
+ delete=" Alt+d"
11
13
12
14
# colors
13
15
help_color=" #334433"
@@ -42,9 +44,9 @@ main () {
42
44
Use <span color='${help_color} '>${switch_view} </span> to switch View. <span color='${help_color} '>${actions} </span> for actions"
43
45
if [[ $mode == " bookmarks" ]]; then
44
46
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 ' )
45
- menu=$( echo " ${content} " | _rofi -p ' > ' -filter " ${filter} " -mesg " ${HELP} " -kb-custom-1 " ${new_bookmark} " -kb-custom-2 " ${switch_view} " -kb-custom-3 " ${actions} " )
47
+ 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} " )
46
48
elif [[ $mode == " tags" ]]; then
47
- 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} " )
49
+ 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} " )
48
50
fi
49
51
val=$?
50
52
if [[ $val -eq 1 ]]; then
@@ -53,6 +55,10 @@ Use <span color='${help_color}'>${switch_view}</span> to switch View. <span colo
53
55
optionsMenu
54
56
elif [[ $val -eq 10 ]]; then
55
57
addMark
58
+ elif [[ $val -eq 14 ]]; then
59
+ deleteMenu
60
+ elif [[ $val -eq 13 ]]; then
61
+ editMenu
56
62
elif [[ $val -eq 11 ]]; then
57
63
if [[ $mode == " bookmarks" ]]; then
58
64
export mode=" tags"
@@ -137,7 +143,7 @@ deleteMenu () {
137
143
exit
138
144
elif [[ $val -eq 0 ]]; then
139
145
if [[ $delask == " 1. Yes" ]]; then
140
- buku -d ${id}
146
+ buku -d ${id} --tacit
141
147
mode=bookmarks main
142
148
elif [[ $delask == " 2. No" ]]; then
143
149
optionsMenu
@@ -149,7 +155,7 @@ editMenu () {
149
155
bookmark=$( echo " ${menu} " | awk ' { print $2 }' )
150
156
id=$( echo " ${menu} " | awk ' { print $1 }' )
151
157
tags=$( echo " ${menu} " | awk ' { print substr($0, index($0,$3)) }' | sed ' s/NOTAG//g' )
152
- content=$( echo -e " url: $bookmark \ntags : $tags " )
158
+ content=$( echo -e " 1. url: $bookmark \n2. tags : $tags " )
153
159
editmenu=$( echo -e " < Return\n---\n${content} " | _rofi -p ' > ' )
154
160
val=$?
155
161
if [[ $val -eq 1 ]]; then
0 commit comments