# tired of waiting for vaporware? # need something minimal and elegant to browse the web the way it meant to be? # Introducing the .bashrc Browser extensions # ; licensed under AGPL 3.0; drop in .bashrc alias webread="sed 's/<[^a][^>]*>//g ; /^$/d' | sed 's/ */ /g' |fmt --width=$(tput cols) | less " alias webload='wget -O - -o /dev/null ' function w(){ webload "$1" | webread } function wsearch(){ queryddg="$@" webload "https://duckduckgo.com/html/?q=$queryddg" | webread } function wmedia(){ feh "$1" } function tubesearch(){ queryyt="$@" webload "https://m.youtube.com/results?search_query=$queryyt" | webread
} function wvideo(){ #replace vlc with player of choice(e.g. mpv) #and adjust 480 to preferred video height(e.g.1080 (but slower)) youtube-dl --no-call-home -o - -f 'best[height<=480]' "$1" | vlc }
Bash is awesome function wind(){ wind_dir=(N NNE NE ENE E ESE SE SSE S SSW SW WSW W WNW NW NNW N) echo "${wind_dir[$(calc "int($1/22.5)")]}" } echo "wind direction $(wind 290) speed 30"