diff options
| author | Akshay Nair <phenax5@gmail.com> | 2024-09-07 15:56:47 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2024-09-07 15:56:47 +0530 |
| commit | 433b6ccecf41bb4ae7fadc84cd1bbb8af163b941 (patch) | |
| tree | 903cba8373520fd99afee9979045701fbdb1fa17 /config/qutebrowser | |
| parent | 86d3b43cbc880da156b81c9f5f30396d1f7de308 (diff) | |
| download | nixos-config-433b6ccecf41bb4ae7fadc84cd1bbb8af163b941.tar.gz nixos-config-433b6ccecf41bb4ae7fadc84cd1bbb8af163b941.zip | |
Failed attempt at ddg style in qute
Diffstat (limited to 'config/qutebrowser')
| -rw-r--r-- | config/qutebrowser/config.py | 17 | ||||
| -rw-r--r-- | config/qutebrowser/greasemonkey/duckduckgo.js | 53 |
2 files changed, 59 insertions, 11 deletions
diff --git a/config/qutebrowser/config.py b/config/qutebrowser/config.py index d741669..7db4c10 100644 --- a/config/qutebrowser/config.py +++ b/config/qutebrowser/config.py @@ -17,6 +17,7 @@ config.load_autoconfig() # Helper Functions {{{ def toggle_stylesheets(stylesheets): + # TODO: Remove the given stylesheets from the list return 'config-cycle content.user_stylesheets \'' \ + json.dumps(c.content.user_stylesheets) \ + '\' \'' \ @@ -153,9 +154,11 @@ config.source('ui.py') ## Webpage styles c.content.user_stylesheets = [ - "styles/scrollbar.css", - "styles/default.css", - "styles/adblocker.css", + 'styles/scrollbar.css', + 'styles/default.css', + 'styles/adblocker.css', + # TODO: Add user styles for lite.duckduckgo.com + # 'styles/duckduckgo.css' ] # Dark mode @@ -286,11 +289,13 @@ config.set('content.media.video_capture', True, '*://meet.google.com') c.url.default_page = '~/.config/qutebrowser/homepage/index.html' c.url.start_pages = [c.url.default_page] -DEFAULT_SEARCH_ENGINE = 'go' +DEFAULT_SEARCH_ENGINE = 'd' c.url.searchengines = { # Main general - 'd': 'https://duckduckgo.com/?q={}', - 'go': 'https://google.com/search?q={}', + 'd': 'https://lite.duckduckgo.com/lite?q={}', + 'go': 'https://lite.duckduckgo.com/lite?q={}', + 'gg': 'https://google.com/search?q={}', + 'ai': 'https://chatgpt.com/?temporary-chat=true&q={}', 'br': 'https://search.brave.com/search?q={}', # Alt general diff --git a/config/qutebrowser/greasemonkey/duckduckgo.js b/config/qutebrowser/greasemonkey/duckduckgo.js index f1c9247..c950abb 100644 --- a/config/qutebrowser/greasemonkey/duckduckgo.js +++ b/config/qutebrowser/greasemonkey/duckduckgo.js @@ -1,16 +1,59 @@ // ==UserScript== -// @name Github PR helper +// @name DuckduckGo styles // @namespace phenax.github.io // @version 0.0.0 // @description Github PR helper // @author Akshay Nair -// @match *://duckduckgo.com/* +// @match *://*.duckduckgo.com/* // ==/UserScript== (() => { - const load = str => - str.split(' ').forEach(x => (document.cookie = x)); + document.body.classList.add('document-duckduckgo'); - load('ae=d; 5=2; s=m; p=-2; am=osm; a=JetBrains%20Mono; t=JetBrains%20Mono; j=0f0c19; 7=15121f; 21=1f1c29;') + GM_addStyle(` +.document-duckduckgo { + --ff-accent-color: #8161ff; + --ff-bg-color: #16121f; +} + +.document-duckduckgo { + background-color: var(--ff-bg-color) !important; + color: white !important; + width: 100%; + margin: auto; + max-width: 900px !important; +} + +.document-duckduckgo a { + color: var(--ff-accent-color) !important; +} + +.document-duckduckgo .result-link { + font-size: 1rem !important; +} + +.document-duckduckgo .did-you-mean { + font-size: 0.8rem !important; +} +.document-duckduckgo .did-you-mean br { + display: none !important; +} + +.document-duckduckgo select.submit { + display: none !important; +} + +.document-duckduckgo .link-text { + color: #888 !important; +} + +.document-duckduckgo .header { + font-size: 1rem !important; +} + +.document-duckduckgo .result-sponsored { + display: none !important; +} +`); })(); |
