dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 321d96cf825de2c5179d590ede1255cbc4d65152
parent 84a44a4463649baa73a9a7aa26cffa183aa419f3
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Wed, 19 Dec 2018 10:40:36 +0100

Misc ducksearch cleanup, move newsboat config

Diffstat:
Rlinks/.newsboat/config -> links/.config/newsboat/config | 0
Dlinks/.newsboat/urls | 105-------------------------------------------------------------------------------
Mlinks/bin/ducksearch | 17+++++++++--------
3 files changed, 9 insertions(+), 113 deletions(-)

diff --git a/links/.newsboat/config b/links/.config/newsboat/config diff --git a/links/.newsboat/urls b/links/.newsboat/urls @@ -1,105 +0,0 @@ -http://feeds.feedburner.com/coldhardfacts?format=xml "Misc" -http://www.jspowerhour.com/comics.rss "Misc" -http://www.smbc-comics.com/rss.php "Misc" -http://www.threewordphrase.com/rss.xml "Misc" -https://what-if.xkcd.com/feed.atom "Misc" -https://xkcd.com/rss.xml "Misc" -http://www.dr.dk/nyheder/service/feeds/allenyheder "News" -http://www.democracynow.org/democracynow.rss "News" -https://stallman.org/rss/rss.xml "News" -https://www.35mmc.com/feed/ "Photography" -https://www.youtube.com/feeds/videos.xml?channel_id=UC8Pksdbj37CdE00kmE7Z1dw "Photography" -https://www.japancamerahunter.com/feed/ "Photography" -http://www.lenswork.com/podcast.xml "Photography" -http://www.lensworkonline.com/recentadditions.xml "Photography" -https://luminous-landscape.com/feed/ "Photography" -http://martinbluhm.zenfolio.com/blog.rss "Photography" -http://phillipreeve.net/blog/feed/ "Photography" -http://lenspire.zeiss.com/en/feed/ "Photography" -http://www.igsoc.org/rss/annals64_new.xml "Research" -http://www.journals.elsevier.com/computers-and-geosciences/rss/ "Research" -http://rss.sciencedirect.com/publication/science/0012821X "Research" -http://onlinelibrary.wiley.com/rss/journal/10.1002/(ISSN)1096-9837 "Research" -http://www.earth-surf-dynam.net/xml/rss2_0.xml "Research" -http://feeds.launchpad.net/esys-particle/announcements.atom "Research" -http://journals.cambridge.org/data/rss/feed_JOG_FirstView_rss_2.0.xml "Research" -http://journals.cambridge.org/data/rss/feed_AOG_FirstView_rss_2.0.xml "Research" -http://journal.frontiersin.org/journal/earth-science/section/cryospheric-sciences/rss "Research" -http://journal.frontiersin.org/journal/earth-science/rss "Research" -http://rss.sciencedirect.com/publication/science/0169555X "Research" -http://onlinelibrary.wiley.com/rss/journal/10.1002/(ISSN)1944-8007 "Research" -http://link.springer.com/search.rss?facet-content-type=Article&facet-journal-id=10035&channel-name=Granular+Matter "Research" -https://igpp.ucsd.edu/news/rss.xml "Research" -http://onlinelibrary.wiley.com/rss/journal/10.1002/%28ISSN%292169-9011 "Research" -http://www.igsoc.org/rss/journal_new.xml "Research" -http://www.nature.com/nature/current_issue/rss/ "Research" -http://feeds.nature.com/nclimate/rss/current "Research" -http://feeds.nature.com/ngeo/rss/current "Research" -http://www.journals.elsevier.com/powder-technology/rss/ "Research" -http://feeds.aps.org/rss/tocsec/PRE-Computationalphysics.xml "Research" -http://feeds.aps.org/rss/tocsec/PRE-Fluiddynamics.xml "Research" -http://feeds.aps.org/rss/tocsec/PRE-Granularmaterials.xml "Research" -http://www.journals.elsevier.com/quaternary-science-reviews/rss "Research" -http://www.sciencemag.org/rss/current.xml "Research" -http://rss.sciencedirect.com/publication/science/02773791 "Research" -http://www.the-cryosphere.net/xml/rss2_0.xml "Research" -http://feeds.feedburner.com/edp_epje?format=xml "Research" -http://onlinelibrary.wiley.com/rss/journal/10.1002/(ISSN)2169-9291 "Research" -http://feeds.arstechnica.com/arstechnica/index "Tech" -https://micronews.debian.org/feeds/feed.rss "Tech" -http://www.debian.org/News/news "Tech" -http://geodatahub.dk/feed.xml "Tech" -http://www.daemonology.net/hn-daily/index.rss "Tech" -http://imapfw.offlineimap.org/feed.xml "Tech" -https://blog.kitware.com/feed/ "Tech" -https://dev.mutt.org/hg/mutt/rss-log "Tech" -https://gitlab.com/muttmua/mutt/commits/master?format=atom "Tech" -http://neovim.org/news.xml "Tech" -http://feeds.feedburner.com/nvidia/parallelforall "Tech" -https://blog.torproject.org/blog/feed "Tech" -http://motherboard.vice.com/rss "Tech" -http://vimcasts.org/feeds/quicktime.rss "Tech" -http://filmlabapp.com/feed.xml "Photography" -https://www.youtube.com/feeds/videos.xml?channel_id=UCwmhwNhFOgCpwQZ4hdWQ7EQ "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCaS4coxA2k1GU348UjJFi_Q "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCHyPdxeP9Ww0y_bMgeP1jxw "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCFJSxBWfYv_VCz_heG-FczA "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCrBxmNwqe2pBpQB7LhB7z-w "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCDvq7BPaphEIhBlyDN19rvQ "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UC2Mkxf1n2TEnjuKIxf7S-DQ "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UC8uT9cgJorJPWu7ITLGo9Ww "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UC323QJ81e2PXPgMuCF3B5Xg "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCUbAIlQq6qdOCW7nURh9Qog "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCf98WFQLzORUfCinbycwXXQ "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UC9DkCKm4_VDztRRyge4mCJQ "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCUC_2Z23y5wGOVG2X1ulCCg "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UChgZlXub-dVuGtTq11O7yZA "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCLcKQhTO6i0oq10S234vWyA "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCrZlzcRfCKLngZnqNTmTQjw "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCMYTOWED2RUuRD1QWVcbdiw "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UC99aCAfYrNqIF6st3gNeHzw "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCkcuvqBAZPgTJ9evx9wkzvA "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCTgaiv8YdmmNqI8STrpWc7w "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCR-I25_yEl_frEZ26I9ty-w "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCopwCE5bVtffQif8IFkbUuw "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCt7fwAhXDy3oNFTAzF2o8Pw "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCc-9JMcDZSh6R4OXuWX6Gag "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCVmgQawOcdeA9v9o0aukV7A "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCSFAYalJ2Q7Tm_WmLgetmeg "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCJgJWICGMzzvXk2wIgqxVEQ "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UC7T8roVtC_3afWKTOGtLlBA "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCDkJEEIifDzR_2K2p9tnwYQ "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UC8lJ3EM0VC4TS0jY6VJtTcw "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UC6t7IQyBM77KVoCUPfuveOA "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCN1-864p2gbPiJtnRG3Oujg "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCfhW84xfA6gEc4hDK90rR1Q "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UC9IuUwwE2xdjQUT_LMLONoA "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UC4m2G6T18_JcjwxwtwKJijw "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCIBaDdAbGlFDeS33shmlD0A "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UC7c8mE90qCtu11z47U0KErg "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UC9-y-6csu5WGm29I7JiwpnA "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCm9BPmxgO7fW7_lOXl9-mPw "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCOebd74GjFKVVqMKYuhanjA "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCzFfuU06f327-bnI3lODUNQ "YouTube Subscriptions" -https://www.youtube.com/feeds/videos.xml?channel_id=UCMx-iVKPpKiRPQfc39nXvXw "YouTube Subscriptions" diff --git a/links/bin/ducksearch b/links/bin/ducksearch @@ -1,21 +1,22 @@ #!/bin/sh +# Gives a dmenu prompt to search DuckDuckGo. +# Without input, will open DuckDuckGo.com. +# URLs will be directly handed to the browser. +# Anything else, it search it. browser=${BROWSER:-firefox} pgrep -x dmenu && exit -query=$(echo "duckduckgo.com" | dmenu -i -p "Search DuckDuckGo:") || exit 1 +choice=$(echo "🦆" | dmenu -i -p "Search DuckDuckGo:") || exit 1 -if [ "$query" = "duckduckgo.com" ]; then - echo go to ddg +if [ "$choice" = "🦆" ]; then $browser "https://duckduckgo.com" else # Detect if url - if [[ "$query" =~ ^(http:\/\/|https:\/\/)?[a-zA-Z0-9]+.[a-zA-Z]+$ ]]; then - echo this is a url - $browser "$query" + if [[ "$choice" =~ ^(http:\/\/|https:\/\/)?[a-zA-Z0-9]+\.[a-zA-Z]+(/)?.*$ ]]; then + $browser "$choice" else - echo this is not a url - $browser "https://duckduckgo.com/?q=$query&t=ffab&atb=v1-1" + $browser "https://duckduckgo.com/?q=$choice&t=ffab&atb=v1-1" fi fi