accidental commit

This commit is contained in:
coolnsx
2023-02-16 17:59:41 +05:30
parent 48b2c30cad
commit 4f571d9d9e
3 changed files with 20 additions and 18 deletions

5
bkmark
View File

@@ -2,9 +2,10 @@
#script for bookmarking selected items and later using it..
data="$(wl-paste -p | tr '\n' '\`')"
data="$(wl-paste -p | tr '\n' '\`' | sed 's/$/ /g')"
file="$HOME/.cache/bookmarks"
oshi_file="$HOME/.cache/oshi-urls"
if [ "$*" = "add" ];then
if [ -z "$data" ];then
@@ -21,7 +22,7 @@ elif [ "$*" = "rm" ];then
del=$(printf "%s" "$data" | bemenu --fn 'Roboto 15' -i -c -W 0.6 -B 3 -l 30 -p "delete-bookmark :" | cut -f1)
[ -z "$del" ] || (sed -i "${del}d" "$file" && notify-send "Bookmarked deleted")
else
wtype -d 5 "$(sed '/^$/d' "$file" | bemenu --fn 'Roboto 15' -i -c -W 0.6 -B 3 -l 30 -p "Put-bookmark :" | tr '\`' '\n')"
wtype -d 10 "$(sed '/^$/d' "$file" "$oshi_file" | sed -E 's/.*DL: ([^|]*).*/\1/g' | bemenu --fn 'Roboto 15' -i -c -W 0.6 -B 3 -l 30 -p "Put-bookmark :" | tr '\`' '\n')"
fi
sed -i '/^$/d' "$file"