diff options
author | nikolaus <nikolaus@fishbox.fritz.box> | 2023-01-16 15:09:03 +0100 |
---|---|---|
committer | nikolaus <nikolaus@fishbox.fritz.box> | 2023-01-16 15:09:03 +0100 |
commit | 7342d3d5c563d593fae107363d8c5a5371e8f440 (patch) | |
tree | fa09a222b5f8bc2fa1e7cfc066f0b84f3945e311 /dmenubookmark | |
parent | 3a9084f770fa22189b378f5c8848fa51b08756b2 (diff) |
Diffstat (limited to 'dmenubookmark')
-rwxr-xr-x | dmenubookmark | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/dmenubookmark b/dmenubookmark index 660272b..b064470 100755 --- a/dmenubookmark +++ b/dmenubookmark @@ -1,13 +1,9 @@ #!/bin/sh +bookmark_file=~/.cache/bookmarks if [ -z "$1" ] then - bookmark_file=~/.cache/bookmarks - choice=$(gawk -F '§§§' '{print($2)}' $bookmark_file | dmenu -p 'Search for Bookmark' -l 20) - [ -z "$choice" ] && exit || - link=$(echo $choice | xargs -I §€§ grep '§€§' $bookmark_file | gawk -F '§§§' '{print($1)}') - linkhandler $link - + choice=$(cat $bookmark_file | dmenu -p 'Bookmarks' -l 50 -i | cut -d' ' -f1) + [ -z "$choice" ] && exit || xdotool type --delay 0 "$choice" else - name=$(echo $1 | dmenu -p 'Description of the Bookmark:') && - echo $1§§§$name >> ~/.cache/bookmarks + echo "$1" >> $bookmark_file fi |