[rofi] Change to alacritty and qute

This commit is contained in:
2021-07-26 22:48:15 -04:00
parent faea153711
commit a24db284f2
3 changed files with 20 additions and 11 deletions

View File

@ -2,8 +2,8 @@ configuration {
modi: "window,run,ssh,combi";
width: 50;
lines: 7;
terminal: "kitty";
font: "Inconsolata 10";
terminal: "alacritty";
font: "Go Mono 10";
show-icons: true;
combi-modi: "window,drun,ssh";
}

View File

@ -25,6 +25,7 @@ URLS=(
["books"]="http://1lib.us/s/"
["amazon"]="https://www.amazon.com/s?k="
["stackoverflow"]="http://stackoverflow.com/search?q="
["hoogle"]="https://www.google.com/search?q="
["code"]="https://searchcode.com/?q="
["beer"]="https://www.beeradvocate.com/search/?qt=beer&q="
["jira"]="https://15five-dev.atlassian.net/browse/ENG-"
@ -32,7 +33,7 @@ URLS=(
["search"]="https://search.unbl.ink/?q="
["ebay"]="https://www.ebay.com/sch/i.html?LH_BIN=1&_nkw="
["ffcompany"]="https://admin.cloud100.15five.com/admin/dj/company/company/?q="
["ffuser"]="https://admin.cloud100.15five.com/admin/dj/user/?q="
["ffuser"]="https://admin.cloud100.15five.com/admin/dj/ff/user/?q="
["ffsamlconf"]="https://admin.cloud100.15five.com/admin/dj/saml2/saml2config/?q="
)
@ -67,7 +68,15 @@ main() {
if [[ -n "$query" ]]; then
URL=${URLS[$platform]}$(urlencode "$query")
qutebrowser --target window $URL
if [[ $platform = 'ffcompany' ]]; then
firefox $URL
elif [[ $platform = 'ffuser' ]]; then
firefox $URL
elif [[ $platform = 'ffsamlconf' ]]; then
firefox $URL
else
qutebrowser --target window $URL
fi
else
exit
fi

View File

@ -6,20 +6,20 @@ OPTS=-u "$AGENT" -z 1.1
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
URL=$(cat $HISTORY | rofi -fuzzy -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
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
exit 0
fi
qutebrowser --target window "$URL"