diff options
author | tsxv478 <atvx717@infraredcombat.xyz> | 2022-11-13 04:17:20 +0300 |
---|---|---|
committer | tsxv478 <atvx717@infraredcombat.xyz> | 2022-11-13 04:17:20 +0300 |
commit | 4a42c6030946971124fc4b7d7d5337ad70979a95 (patch) | |
tree | 1129eedfa9ed13974257c95ea6e66aa85a472da7 /bm | |
parent | 3e0ee3784ae3066c969fc4340fe330adecb45c34 (diff) |
minor fixes
Diffstat (limited to 'bm')
-rwxr-xr-x | bm | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,13 +1,13 @@ #!/bin/sh -path="$HOME/.local/share/bookmarks.txt" -bookmark=$(cat $path | dmenu -i -c -l 15 -p "Bookmark:") +dir="$HOME/.local/share/bookmarks.txt" +bookmark=$(tac $dir | dmenu -i -c -l 15 -p "Bookmark:") [ -z $bookmark ] && exit # append a url to the list if it's not present and exit -[ -z $(grep -F $bookmark $path) ] && printf "%s\n" "$bookmark" >> $path && exit +[ -z $(grep -F $bookmark $dir) ] && printf "%s\n" "$bookmark" >> $dir && exit -action=$(printf "Open in browser\nCopy to clipboard\n" | dmenu -i -c -l 2 -p "Action:") +action=$(printf "Open in browser\nCopy to clipboard" | dmenu -i -c -l 2 -p "Action:") case $action in "Open in browser") $BROWSER $bookmark ;; |