[i3] Add better rofi tools to I3

This commit is contained in:
2021-02-04 18:03:59 -05:00
parent dcae1a4f1b
commit 57c16cf9ec
5 changed files with 60 additions and 45 deletions

27
rofi/.config/rofi/www.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
AGENT="Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.3) Gecko/20090913 Firefox/3.5.3"
OPTS=-u "$AGENT" -z 1.1
#OPTS="-z 1.5"
HISTORY=~/var/rofi-www-history
if [ "$1" = "" ]
then
URL=`cat $HISTORY | rofi -hide-scrollbar -dmenu -p "URL: "`
echo "$URL" | grep -e ^http || CLIP=https://$CLIP
echo "$URL" >> $HISTORY
else
URL=$@
echo "$@" | grep -e ^http && CLIP=https://$CLIP
echo "$@" >> $HISTORY
fi
TMP=`tempfile`
cat $HISTORY | sort | uniq >> $TMP && mv $TMP $HISTORY
rm -f $TMP
if [ "$URL" = "" ]
then
exit 0
fi
/home/powellc/.asdf/shims/qutebrowser ":open -w $URL"