2020-06-21 10:41:26 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
groups="$(ls "$HOME/scripts/bookmarks")\nauswahl"
|
2020-08-09 11:42:22 +00:00
|
|
|
group_selection=$(echo -e "$groups" | rofi -i -matching fuzzy -p open -dmenu -no-custom)
|
2020-06-21 10:41:26 +00:00
|
|
|
if [ "$group_selection" = "auswahl" ]; then
|
2020-08-09 11:42:22 +00:00
|
|
|
auswahl "$(auswahl --list | rofi -dmenu -i -no-custom)"
|
2020-06-21 10:41:26 +00:00
|
|
|
else
|
2020-08-09 11:42:22 +00:00
|
|
|
selection=$( cat "$HOME/scripts/bookmarks/$group_selection" | sed -r 's/^([^ ]*) .*$/\1/' | rofi -p open -matching fuzzy -dmenu -i -no-custom)
|
2020-06-21 10:41:26 +00:00
|
|
|
[ -z "$selection" ] && exit 1
|
|
|
|
|
|
|
|
cat "$HOME/scripts/bookmarks/$group_selection" | sed -n -r "s/^$selection (.*)$/\1/p" | bash
|
|
|
|
fi
|