💾 Archived View for hajime.4teri.de › dotfiles › file › scripts › bookmarks.sh.gmi captured on 2021-12-04 at 18:04:22. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-12-03)

-=-=-=-=-=-=-

bookmarks.sh - dotfiles - Collection of my dotfiles

Log

Files

Refs

---

bookmarks.sh (500B)

---

1 #! /bin/sh

2

3 DB_PATH="/home/zocki/.config/pmb"

4

5 die()

6 {

7 if [ -z "$1" ]

8 then

9 notify-send "Could not get selection/url. Aborting!"

10 else

11 notify-send "$1"

12 fi

13 exit

14 }

15 db=$(/bin/ls $DB_PATH/*.db | replace "$DB_PATH/" "" | rofi -dmenu)

16 if [ -z "$db" ]

17 then

18 die

19 fi

20

21 PMB="pmb -f "$DB_PATH/$db""

22

23 chosen=$($PMB -p field=name | rofi -dmenu)

24 if [ -z "$chosen" ]

25 then

26 die

27 fi

28

29 url=$($PMB -s name="$chosen",field=url)

30

31 if [ -z "$chosen" ]

32 then

33 die

34 fi

35

36 xdotool type --delay 0 "$url"

37 xdotool key KP_Enter

generated w/ stagit-gemini