[rofi] Change to alacritty and qute
This commit is contained in:
@ -2,8 +2,8 @@ configuration {
|
|||||||
modi: "window,run,ssh,combi";
|
modi: "window,run,ssh,combi";
|
||||||
width: 50;
|
width: 50;
|
||||||
lines: 7;
|
lines: 7;
|
||||||
terminal: "kitty";
|
terminal: "alacritty";
|
||||||
font: "Inconsolata 10";
|
font: "Go Mono 10";
|
||||||
show-icons: true;
|
show-icons: true;
|
||||||
combi-modi: "window,drun,ssh";
|
combi-modi: "window,drun,ssh";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,6 +25,7 @@ URLS=(
|
|||||||
["books"]="http://1lib.us/s/"
|
["books"]="http://1lib.us/s/"
|
||||||
["amazon"]="https://www.amazon.com/s?k="
|
["amazon"]="https://www.amazon.com/s?k="
|
||||||
["stackoverflow"]="http://stackoverflow.com/search?q="
|
["stackoverflow"]="http://stackoverflow.com/search?q="
|
||||||
|
["hoogle"]="https://www.google.com/search?q="
|
||||||
["code"]="https://searchcode.com/?q="
|
["code"]="https://searchcode.com/?q="
|
||||||
["beer"]="https://www.beeradvocate.com/search/?qt=beer&q="
|
["beer"]="https://www.beeradvocate.com/search/?qt=beer&q="
|
||||||
["jira"]="https://15five-dev.atlassian.net/browse/ENG-"
|
["jira"]="https://15five-dev.atlassian.net/browse/ENG-"
|
||||||
@ -32,7 +33,7 @@ URLS=(
|
|||||||
["search"]="https://search.unbl.ink/?q="
|
["search"]="https://search.unbl.ink/?q="
|
||||||
["ebay"]="https://www.ebay.com/sch/i.html?LH_BIN=1&_nkw="
|
["ebay"]="https://www.ebay.com/sch/i.html?LH_BIN=1&_nkw="
|
||||||
["ffcompany"]="https://admin.cloud100.15five.com/admin/dj/company/company/?q="
|
["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="
|
["ffsamlconf"]="https://admin.cloud100.15five.com/admin/dj/saml2/saml2config/?q="
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -67,7 +68,15 @@ main() {
|
|||||||
|
|
||||||
if [[ -n "$query" ]]; then
|
if [[ -n "$query" ]]; then
|
||||||
URL=${URLS[$platform]}$(urlencode "$query")
|
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
|
else
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -6,20 +6,20 @@ OPTS=-u "$AGENT" -z 1.1
|
|||||||
HISTORY=~/var/rofi-www-history
|
HISTORY=~/var/rofi-www-history
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
if [ "$1" = "" ]; then
|
||||||
URL=$(cat $HISTORY | rofi -hide-scrollbar -dmenu -p "URL: ")
|
URL=$(cat $HISTORY | rofi -fuzzy -hide-scrollbar -dmenu -p "URL: ")
|
||||||
echo "$URL" | grep -e ^http || CLIP=https://$CLIP
|
echo "$URL" | grep -e ^http || CLIP=https://$CLIP
|
||||||
echo "$URL" >>$HISTORY
|
echo "$URL" >>$HISTORY
|
||||||
else
|
else
|
||||||
URL=$@
|
URL=$@
|
||||||
echo "$@" | grep -e ^http && CLIP=https://$CLIP
|
echo "$@" | grep -e ^http && CLIP=https://$CLIP
|
||||||
echo "$@" >>$HISTORY
|
echo "$@" >>$HISTORY
|
||||||
fi
|
fi
|
||||||
TMP=$(tempfile)
|
TMP=$(tempfile)
|
||||||
cat $HISTORY | sort | uniq >>$TMP && mv $TMP $HISTORY
|
cat $HISTORY | sort | uniq >>$TMP && mv $TMP $HISTORY
|
||||||
rm -f $TMP
|
rm -f $TMP
|
||||||
|
|
||||||
if [ "$URL" = "" ]; then
|
if [ "$URL" = "" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
qutebrowser --target window "$URL"
|
qutebrowser --target window "$URL"
|
||||||
|
|||||||
Reference in New Issue
Block a user