summaryrefslogtreecommitdiff
path: root/.config/qutebrowser/config.py
diff options
context:
space:
mode:
Diffstat (limited to '.config/qutebrowser/config.py')
-rw-r--r--.config/qutebrowser/config.py28
1 files changed, 16 insertions, 12 deletions
diff --git a/.config/qutebrowser/config.py b/.config/qutebrowser/config.py
index 892966d..88b9d7e 100644
--- a/.config/qutebrowser/config.py
+++ b/.config/qutebrowser/config.py
@@ -3,7 +3,7 @@ import os
c.content.cookies.accept = "no-3rdparty"
c.content.cookies.store = True
-c.downloads.location.directory = '/home/lxf/temp/'
+c.downloads.location.directory = '/home/lxf/inbox/'
c.downloads.location.suggestion = "both"
c.downloads.remove_finished = 20
@@ -23,7 +23,9 @@ c.editor.command = ['urxvt', '-e', 'vim', '{}']
c.url.default_page = "about:blank"
# searches
-c.url.searchengines['DEFAULT'] = 'https://duckduckgo.com/?q={}'
+c.url.searchengines['DEFAULT'] = 'https://search.brave.com/search?q={}'
+c.url.searchengines['d'] = 'https://duckduckgo.com/?q={}'
+c.url.searchengines['b'] = 'https://search.brave.com/search?q={}'
c.url.searchengines['s'] = 'https://www.startpage.com/rvd/search?query={}&language=auto'
c.url.searchengines['g'] = 'http://www.google.com/search?hl=en&source=hp&ie=ISO-8859-l&q={}'
c.url.searchengines['a'] = 'https://wiki.archlinux.org/?search={}'
@@ -34,12 +36,9 @@ c.url.searchengines['w'] = 'https://www.google.com/search?q={}+site%3Awired.com'
c.url.searchengines['e'] = 'https://duckduckgo.com/?q={}+site%3Ahttps%3A%2F%2Fwww.elliotoracle.com%2Fblog%2F&t=fpas&ia=web'
# aliases
-c.aliases['lux'] = 'open -t https://live.luxagraf.net/admin/'
-c.aliases['aws'] = 'open -t https://console.aws.amazon.com/'
-c.aliases['dri'] = 'open -t https://drive.google.com/drive/folders/1Rbbmkz5_Oi9bFzzoNbGtju_RbDMnv2Ul'
-c.aliases['co'] = 'open -t https://copilot.condenast.io/wrd/dashboard'
-c.aliases['air'] = 'open -t https://airtable.com/tblV9JHwZkvs5aHRR/viwGZg2OuVNR8BUiO?blocks=hide'
-c.aliases['gma'] = 'open -t https://mail.google.com/mail/u/0/'
+c.aliases['lux'] = 'open -t https://luxagraf.net/'
+c.aliases['live'] = 'open -t https://live.luxagraf.net/'
+c.aliases['ad'] = 'open -t https://live.luxagraf.net/admin/'
# toggle JS
config.bind("xjt", "set content.javascript.enabled true")
@@ -78,9 +77,9 @@ config.bind('K', 'tab-next', mode='normal')
# Userscripts
# search history/bookmarks in dmenu
-config.bind (',m', 'spawn --userscript dmenu-open ', mode='normal')
-config.bind (',o', 'spawn --userscript dmenu-open ', mode='normal')
-config.bind (',O', 'spawn --userscript dmenu-open --tab', mode='normal')
+config.bind (',m', 'spawn --userscript dmenu_qutebrowser ', mode='normal')
+config.bind (',o', 'spawn --userscript dmenu_qutebrowser ', mode='normal')
+config.bind (',O', 'spawn --userscript dmenu_qutebrowser --tab', mode='normal')
# call readability on page
config.bind (',r', 'spawn --userscript readability', mode='normal')
@@ -103,6 +102,12 @@ config.bind (',e', 'open-editor')
# save bookmark to luxagraf
config.bind(',s', "jseval --quiet if(document.getSelection){s=document.getSelection();}else{s='';};document.location='https://live.luxagraf.net/admin/links/link/add?&url='+encodeURIComponent(location.href)+'&description='+encodeURIComponent(s)+'&title='+encodeURIComponent(document.title);")
+config.bind(',wn', "jseval --quiet if(document.getSelection){s=document.getSelection();}else{s='';};document.location='https://live.luxagraf.net/gtd/wirednote/create?url='+encodeURIComponent(location.href)+'&description='+encodeURIComponent(s)+'&title='+encodeURIComponent(document.title);")
+
+config.bind(',n', "jseval --quiet if(document.getSelection){s=document.getSelection();}else{s='';};document.location='https://live.luxagraf.net/gtd/note/create?url='+encodeURIComponent(location.href)+'&description='+encodeURIComponent(s)+'&title='+encodeURIComponent(document.title);")
+
+config.bind(',c', "jseval --url javascript:void%20function()%7Bvar%20a=0%3C=location.href.search(/(amazon.%7Camzn.)(com%7Cco%5C.uk%7Cca%7Cde%7Cfr%7Ces%7Cit%7Ccn%7Cco%5C.jp).+/i),b=0%3C=location.href.search(/amazon.(com%7Cco%5C.uk%7Cca%7Cde%7Cfr%7Ces%7Cit%7Ccn%7Cco%5C.jp).*%5C/(asin%7Cdp%7Cgp%7Cproduct%7Cexec%5C/obidos%7Cgp%5C/offer-listing%7Cproduct%5C-reviews%7Cgp%5C/aw%5C/d)%5C/[A-Z0-9]%7B10,13%7D/i),c=0%3C=location.href.search(/camelcamelcamel.com/i),d=null!=document.getElementById(%22ccc-injected-links-569DE51E-99CE-4ACE-BD10-7F85542A54A8%22),e=%22ctx_prid=5%26utm_campaign=bookmarklet%26v_camelet=%22+%220.2%22;if(b)try%7Bvar%20f=document.getElementById(%22ASIN%22).value;window.open(%22https://camelcamelcamel.com/search%3Fq=%22+window.location.origin+%22/dp/%22+f+%22%26%22+e,%22_blank%22)%7Dcatch(a)%7Bwindow.open(%22https://camelcamelcamel.com/search%3Fq=%22+encodeURIComponent(location.href)+%22%26%22+e,%22_blank%22)%7Delse%20window.open(%22https://camelcamelcamel.com/%3F%22+e,%22_self%22)%7D();")
+
import sys, os
#sys.path.append(os.path.join(sys.path[0], "jblock"))
@@ -127,7 +132,6 @@ config.set(
"duckduckgo.com",
"github.com",
"stackoverflow.com",
- "seekingalpha.com",
],
)