From 7ec31004dfebd7da55ff7f9de57a80fe308c4f17 Mon Sep 17 00:00:00 2001 From: Artur Krajewski Date: Mon, 4 Jun 2018 20:53:18 +0200 Subject: [PATCH 1/4] remove waiting for input when run through launcher --- buku_run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buku_run b/buku_run index f0bf25a..0792286 100755 --- a/buku_run +++ b/buku_run @@ -43,7 +43,7 @@ main () { HELP="Welcome to Buku. Use ${new_bookmark} to add a new Bookmark 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') + content=$(buku -p -f 2 --tacit | grep -v 'waiting for input'| 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}" -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}" -kb-custom-4 "${edit}" -kb-custom-5 "${delete}") From 8479a6210814b7f6ad8473fa21e746eec5f64a53 Mon Sep 17 00:00:00 2001 From: Artur Krajewski Date: Mon, 4 Jun 2018 22:24:37 +0200 Subject: [PATCH 2/4] copy url keybind --- buku_run | 8 ++++++-- config.buku | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/buku_run b/buku_run index 0792286..43b7ee1 100755 --- a/buku_run +++ b/buku_run @@ -10,6 +10,7 @@ new_bookmark="Alt+n" actions="Alt+a" edit="Alt+e" delete="Alt+d" +copyurl="Alt+l" # colors help_color="#334433" @@ -44,9 +45,9 @@ main () { Use ${switch_view} to switch View. ${actions} for actions" if [[ $mode == "bookmarks" ]]; then content=$(buku -p -f 2 --tacit | grep -v 'waiting for input'| 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}" -kb-custom-4 "${edit}" -kb-custom-5 "${delete}") + 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}" -kb-custom-6 "${copyurl}") 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}" -kb-custom-4 "${edit}" -kb-custom-5 "${delete}") + 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}" -kb-custom-6 "${copyurl}") fi val=$? if [[ $val -eq 1 ]]; then @@ -59,6 +60,9 @@ Use ${switch_view} to switch View. Date: Mon, 4 Jun 2018 22:40:38 +0200 Subject: [PATCH 3/4] notifications for open and copy --- buku_run | 14 ++++++++++++-- config.buku | 3 +++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/buku_run b/buku_run index 43b7ee1..5e3ea91 100755 --- a/buku_run +++ b/buku_run @@ -12,6 +12,9 @@ edit="Alt+e" delete="Alt+d" copyurl="Alt+l" +#libnotify messages +notifysend='true' + # colors help_color="#334433" @@ -61,8 +64,11 @@ Use ${switch_view} to switch View. ${switch_view} to switch View. Date: Tue, 5 Jun 2018 00:23:13 +0200 Subject: [PATCH 4/4] option to reverse bookmark list --- buku_run | 9 +++++++-- config.buku | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/buku_run b/buku_run index 5e3ea91..1b5607a 100755 --- a/buku_run +++ b/buku_run @@ -14,6 +14,7 @@ copyurl="Alt+l" #libnotify messages notifysend='true' +reverselist='false' # colors help_color="#334433" @@ -47,7 +48,11 @@ main () { HELP="Welcome to Buku. Use ${new_bookmark} to add a new Bookmark Use ${switch_view} to switch View. ${actions} for actions" if [[ $mode == "bookmarks" ]]; then - content=$(buku -p -f 2 --tacit | grep -v 'waiting for input'| awk 'NF == 2 { $0 = $0 "NOTAG" }; { $2 = substr($2,0,80); print $1"\t"$2"\t"$3,$4,$5 }' | column -t -s $'\t') + if [[ $reverselist == "true" ]] ; then + content=$(buku -p -f 2 | grep -v 'waiting for input'| sort -V -r | awk 'NF == 2 { $0 = $0 "NOTAG" }; { $2 = substr($2,0,80); print $1"\t"$2"\t"$3,$4,$5 }' | column -t -s $'\t') + else + content=$(buku -p -f 2 | grep -v 'waiting for input'| awk 'NF == 2 { $0 = $0 "NOTAG" }; { $2 = substr($2,0,80); print $1"\t"$2"\t"$3,$4,$5 }' | column -t -s $'\t') + fi 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}" -kb-custom-6 "${copyurl}") 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}" -kb-custom-4 "${edit}" -kb-custom-5 "${delete}" -kb-custom-6 "${copyurl}") @@ -81,11 +86,11 @@ Use ${switch_view} to switch View.