diff --git a/www b/www new file mode 100755 index 0000000..050ed74 --- /dev/null +++ b/www @@ -0,0 +1,31 @@ +#!/bin/bash + +#Создан: Чт 23 июн 2016 13:14:17 +#Изменён: Чт 23 июн 2016 22:36:27 + +# BROWSER=surf,vimprobable2,vimb,jumanji +BROWSER=vimb + +#title:url +URLS="$SHELLRC/var/www/urls" + +# URL="$(rofi -dmenu -hide-scrollbar -columns 8 -location 1 -width 100 -lines 10 -input $URLS)" + +TITLES="$(awk '/\[/{print NR-1}' $URLS | paste -s -d ',')" + +BADURLS="$(awk '/XXX/{print NR-1}' $URLS | paste -s -d ',')" + +WEBSITE=$(cat $URLS \ + | cut -d ':' -f 1 \ + | sed 's/XXX //' \ + | rofi -dmenu -hide-scrollbar -no-case-sensitive -columns 3 -location 1 -width 100 -lines 10 -a $TITLES -u $BADURLS -p "web:") + +if [ ! -z "$WEBSITE" ]; then + URL="$(grep "${WEBSITE}:" $URLS | cut -d ':' -f 2-)" + + case $URL in + *.*) $BROWSER "$URL" ;; + *) exit;; + esac +fi +