2020-03-27 08:06:13 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-04-02 07:31:20 +00:00
|
|
|
|
|
|
|
|
2020-06-17 21:36:03 +00:00
|
|
|
groups="$(ls "$HOME/scripts/bookmarks")\nauswahl"
|
2020-04-04 13:12:33 +00:00
|
|
|
group_selection=$(echo -e "$groups" | rofi -i -matching fuzzy -p open -dmenu -no-custom -theme /home/leon/scripts/rofi-scripts/default_theme.rasi )
|
2020-06-17 21:36:03 +00:00
|
|
|
if [ "$group_selection" = "auswahl" ]; then
|
|
|
|
auswahl "$(auswahl --list | rofi -dmenu -theme /home/leon/scripts/rofi-scripts/default_theme.rasi -i -no-custom)"
|
|
|
|
else
|
|
|
|
selection=$( cat "$HOME/scripts/bookmarks/$group_selection" | sed -r 's/^([^ ]*) .*$/\1/' | rofi -p open -matching fuzzy -dmenu -i -no-custom -theme /home/leon/scripts/rofi-scripts/default_theme.rasi )
|
|
|
|
[ -z "$selection" ] && exit 1
|
|
|
|
|
|
|
|
cat "$HOME/scripts/bookmarks/$group_selection" | sed -n -r "s/^$selection (.*)$/\1/p" | bash
|
|
|
|
fi
|