summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2023-11-29 19:27:54 -0500
committerluxagraf <sng@luxagraf.net>2023-11-29 19:27:54 -0500
commitae96db890e217da519ff14efc8fb3242eaf85140 (patch)
treec22a3137f8c50e89c85b84ec3b32d0644d016a33
parentbb85025386ae187ede4765a1f8ecc5ef969ba92b (diff)
qute: went back to using qutebrowser
-rw-r--r--.config/openbox/rc.xml3
-rw-r--r--.config/qutebrowser/config.py81
-rw-r--r--.config/qutebrowser/js-whitelist (renamed from .config/qutebrowser/private-whitelist)11
-rw-r--r--.config/qutebrowser/userscripts/dmenu-open36
-rw-r--r--.config/qutebrowser/userscripts/readability.html184
-rw-r--r--.gitconfig2
-rw-r--r--.gitignore1
7 files changed, 268 insertions, 50 deletions
diff --git a/.config/openbox/rc.xml b/.config/openbox/rc.xml
index 13a01bd..d2f040b 100644
--- a/.config/openbox/rc.xml
+++ b/.config/openbox/rc.xml
@@ -855,6 +855,9 @@
<application class="URxvt">
<decor>no</decor>
</application>
+ <application class="vivaldi-snapshot">
+ <decor>no</decor>
+ </application>
<application class="Darktable">
<decor>no</decor>
<desktop>3</desktop>
diff --git a/.config/qutebrowser/config.py b/.config/qutebrowser/config.py
index 88b9d7e..273883d 100644
--- a/.config/qutebrowser/config.py
+++ b/.config/qutebrowser/config.py
@@ -1,25 +1,41 @@
import os
+## In v2.0.0+, one of the following two lines is REQUIRED
+# config.load_autoconfig(False)
+config.load_autoconfig(True)
c.content.cookies.accept = "no-3rdparty"
c.content.cookies.store = True
+c.content.dns_prefetch = False
+c.content.default_encoding = 'utf-8'
+c.content.geolocation = False
+
+## I like my start page(s) and default page to be blank
+c.url.start_pages = ["about:blank"]
+c.url.default_page = "about:blank"
c.downloads.location.directory = '/home/lxf/inbox/'
c.downloads.location.suggestion = "both"
-c.downloads.remove_finished = 20
+c.downloads.remove_finished = 100
c.spellcheck.languages = ["en-US"]
c.auto_save.session = True
+## Display PDFs within qutebrowser
c.content.pdfjs = True
+c.scrolling.bar = 'always'
+
c.session.lazy_restore = True
c.tabs.background = True
c.tabs.position = "bottom"
c.content.autoplay = False
+c.content.blocking.method = 'both'
+
c.editor.command = ['urxvt', '-e', 'vim', '{}']
+config.bind(',vs', 'view-source --edit')
c.url.default_page = "about:blank"
# searches
@@ -35,32 +51,22 @@ c.url.searchengines['aw'] = 'https://www.amazon.com/s?k={}'
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'
+# fuck new reddit
+config.bind (',r2o', 'open https://old.reddit.com/{url:path}')
+
# aliases
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")
-config.bind("xjf", "set content.javascript.enabled false")
-
# block JS out of the box:
c.content.javascript.enabled = False
-js_whitelist = [
- "*://localhost/*",
- "*://127.0.0.1/*",
- "*://github.com/*",
- "*://gitlab.com/*",
- "*://duckduckgo.com/*",
- "*://*.youtube.com/*",
- "*://*.luxagraf.net/*"
- "*://translate.google.com/*",
- "*://schoolsfirst.com/*",
-]
-private_whitelist = os.path.expanduser("~/.config/qutebrowser/private-whitelist")
-if os.path.exists(private_whitelist):
- with open(private_whitelist) as f:
+#enable JS for approved sites
+js_whitelist = []
+whitelist = os.path.expanduser("~/.config/qutebrowser/js-whitelist")
+if os.path.exists(whitelist):
+ with open(whitelist) as f:
js_whitelist += filter(lambda l: bool(l), f.read().split("\n"))
for site in js_whitelist:
@@ -102,39 +108,20 @@ 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);")
+# save note to wirednotes
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);")
+# save note to notes
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);")
+# check amazon price (not working)
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"))
-#config.source("jblock/jblock/integrations/qutebrowser.py")
-#config.set(
-# "content.host_blocking.lists",
-# [
-# "https://easylist.to/easylist/fanboy-annoyance.txt",
-# "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters.txt",
-# "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/annoyances.txt",
-# "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/badware.txt",
-# "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/privacy.txt",
-# "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/resource-abuse.txt",
-# "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/unbreak.txt",
-# "https://www.malwaredomainlist.com/hostslist/hosts.txt",
-# ],
-#)
-
-config.set(
- "content.blocking.whitelist",
- [
- "duckduckgo.com",
- "github.com",
- "stackoverflow.com",
- ],
-)
+#//////////////////////////////////////////
+# everything below is color scheme related
+
+#//////////////////////////////////////////
solarized = {
'base03': '#002b36',
'base02': '#073642',
@@ -154,10 +141,6 @@ solarized = {
'green': '#859900'
}
-## This is here so configs done via the GUI are still loaded.
-## Remove it to not load settings done via the GUI.
-config.load_autoconfig()
-
## Background color of the completion widget category headers.
## Type: QssColor
c.colors.completion.category.bg = solarized['base03']
diff --git a/.config/qutebrowser/private-whitelist b/.config/qutebrowser/js-whitelist
index 1e8ff48..500731f 100644
--- a/.config/qutebrowser/private-whitelist
+++ b/.config/qutebrowser/js-whitelist
@@ -1,3 +1,12 @@
+*://localhost/*,
+*://127.0.0.1/*,
+*://github.com/*,
+*://gitlab.com/*,
+*://duckduckgo.com/*,
+*://*.youtube.com/*,
+*://*.luxagraf.net/*,
+*://translate.google.com/*,
+*://schoolsfirst.com/*,
*://airtable.com/*,
*://auth.condenast.io/*,
*://docs.google.com/*,
@@ -12,3 +21,5 @@
*://tradingview.com/*,
*://pmags.com/*,
*://git.luxagraf.net/*,
+*://*.schwab.com/*,
+*://*.dreamwidth.org/*,
diff --git a/.config/qutebrowser/userscripts/dmenu-open b/.config/qutebrowser/userscripts/dmenu-open
new file mode 100644
index 0000000..f481d00
--- /dev/null
+++ b/.config/qutebrowser/userscripts/dmenu-open
@@ -0,0 +1,36 @@
+#!/usr/bin/env bash
+
+# SPDX-FileCopyrightText: Zach-Button <zachrey.button@gmail.com>
+# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# Pipes history, quickmarks, and URL into dmenu.
+#
+# If run from qutebrowser as a userscript, it runs :open on the URL
+# If not, it opens a new qutebrowser window at the URL
+#
+# Ideal for use with tabs_are_windows. Set a hotkey to launch this script, then:
+# :bind o spawn --userscript dmenu_qutebrowser
+#
+# Use the hotkey to open in new tab/window, press 'o' to open URL in current tab/window
+# You can simulate "go" by pressing "o<tab>", as the current URL is always first in the list
+#
+# I personally use "<Mod4>o" to launch this script. For me, my workflow is:
+# Default keys Keys with this script
+# O <Mod4>o
+# o o
+# go o<Tab>
+# gO gC, then o<Tab>
+# (This is unnecessarily long. I use this rarely, feel free to make this script accept parameters.)
+#
+
+
+[ -z "$QUTE_URL" ] && QUTE_URL='https://duckduckgo.com'
+
+url=$(printf "%s\n%s" "$QUTE_URL" "$(sqlite3 -separator ' ' "$QUTE_DATA_DIR/history.sqlite" 'select title, url from CompletionHistory')" | cat "$QUTE_CONFIG_DIR/quickmarks" - | dmenu -l 15 -p qutebrowser)
+url=$(echo "$url" | sed -E 's/[^ ]+ +//g' | grep -E "https?:" || echo "$url")
+
+[ -z "${url// }" ] && exit
+
+echo "open $url" >> "$QUTE_FIFO" || qutebrowser "$url"
diff --git a/.config/qutebrowser/userscripts/readability.html b/.config/qutebrowser/userscripts/readability.html
new file mode 100644
index 0000000..8387ada
--- /dev/null
+++ b/.config/qutebrowser/userscripts/readability.html
@@ -0,0 +1,184 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>stoecklehauser — Bernard Plossu</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <style type="text/css">
+ body {
+ margin: 40px auto;
+ max-width: 650px;
+ line-height: 1.4;
+ padding: 0 10px;
+ }
+ h1, h2, h3 {
+ line-height: 1.2;
+ }
+ </style>
+</head>
+<div id="readabilityBody"><div class="tab-content tpl-minimal-tabs-cont align-left section-text">
+
+ <div class="tab-pane fade in active" id="mini-one">
+
+
+ <p class="post-prev-img mb-30">
+ <img src="http://stoecklehauser.com/images/bernard_plossu/billandkarina_1966_mini.jpg" alt="bernard plossu"/>
+ </p>
+
+
+
+ <div class="row">
+
+
+ <div class="work-full-detail">
+ <p>
+ <strong>Born:</strong>
+ 1945, DALAT, VIETNAM
+ </p>
+ <p>
+ <strong>Lives:</strong>
+ LIVES AND WORKS IN FRANCE
+ </p>
+
+ </div>
+
+
+
+ <br/>
+ <p>
+ Bernard Plossu (born in 1945), a migratory photographer, has been travelling the world since his first trip to the Sahara with his father in 1958. He has worked in black and white since 1975. A lover of 50 mm lens, he immortalises the Far West of America, California, Mexico, etc. In his youth he wanted to become a filmmaker and his photos bear the traces of his love of films.
+
+Bernard Plossu calls himself a "photographer of females" and, like his master Édouard Boubat, captures the world through bodies, intimately yet modest and respectful. He photographs women with neither vulgarity nor voyeurism, even though they may not be aware of it. From behind, they offer to the photographer and the world their "neck and hair, evidence of [their] beauty".
+ </p>
+ <br/>
+ Bernard Plossu’s Two Realities <p>Bernard Plossu belongs to the generation of photographers that excelled in two different dimensions while trying to make them converge: the strange reality of the “other”(the foreigner, the foreign land) and the strange reality of his own everyday reality, the reality belonging to people like himself living in places he knew all too well. Plossu is one of those artists that understood photography by means of one of its main traits: the travel. To photograph was once, basically, to travel, if I have a camera it is for travelling, I have a camera because I want to travel, cameras are for traveling, demand travelling. To travel in space and to travel in time: the first thing photography allowed was actually the invention or the reinvention of memory, therefore the rediscovering of the past (or the invention of the past). To look at a photograph is to look directly into the past: the photographer was there, this is what he saw and what he saw is what he is seeing. This was a crucial change in the way mankind recorded the world history and all the personal stories.
+<br/>
+This part of his mission Plossu fulfilled travelling all over the world: north of Africa, Mexico, Niger, the USA, India, Portugal: that was the strange, in its different shades of black, white and grey . The second half he developed “at home”, in Paris for example among his equals, in his familiar places and scenes. He once forged the label “surbanaliste” in opposition to “surréalisme”: surbanaliste is the banal, the commonplace underlined, stressed and elevated to its second degree by photography. Most of the photos taken abroad capture the strange which however most of the times is terribly banal initself. And most if not all photos taken “at home”, in a familiar context, capture the banal, the commonplace which is or become terribly strange once fixed in the photographic paper. The circle is closed, albeit remaining eternally open: the two realities meet. The two series of photographs shown at Stöckle Hauser offer an unique occasion to check the main lines of this renowned world and absolutely local photographer. </p>
+ </div>
+ </div>
+
+ <div>
+ <p>Prof. José Teixeira Coelho, 2016 </p>
+ </div>
+
+
+
+
+
+
+
+
+
+ <div class="tab-content tpl-tabs-cont section-text">
+
+
+
+ </div>
+ <div class="tab-pane two" id="mini-two">
+
+ <h2 class="section-title font-alt mb-70 mb-sm-40">
+ all his works
+ </h2>
+
+
+ <div class="col-md-8 col-md-offset-2">
+ <p class="section-text align-center mb-70 mb-xs-40">
+ Use a size of 17 x 26 cm. Unlimited Editions <br/>
+ The technique used is B / W Baryt
+ </p>
+ </div>
+
+
+
+ <div class="row multi-columns-row mb-70 mb-xs-30">
+
+
+ <div class="col-sm-6 col-md-4 col-lg-4 mb-md-50 wow fadeIn" data-wow-delay="0.1s" data-wow-duration="2s">
+
+ <p class="post-prev-img">
+ <a href="http://stoecklehauser.com/works/bernard_plossu/bernard_plossu_paris.html"><img src="http://stoecklehauser.com/images/bernard_plossu/plossu_paris/plossu_paris_1_portada.jpg" height="787" width="1181" alt=""/></a>
+ </p>
+
+
+
+ <p class="post-prev-text">
+ Exclusive by <br/> Gallery Stöckle Hauser
+ </p>
+ </div>
+
+
+
+ <div class="col-sm-6 col-md-4 col-lg-4 mb-md-50 wow fadeIn" data-wow-delay="0.1s" data-wow-duration="2s">
+
+ <p class="post-prev-img">
+ <a href="http://stoecklehauser.com/works/bernard_plossu/bernard_plossu_berlin.html"><img src="http://stoecklehauser.com/images/bernard_plossu/plossu_berlin/plossu_berlin_9.jpg" height="787" width="1181" alt=""/></a>
+ </p>
+
+
+ </div>
+
+
+
+ <div class="col-sm-6 col-md-4 col-lg-4 mb-md-50 wow fadeIn" data-wow-delay="0.1s" data-wow-duration="2s">
+
+ <p class="post-prev-img">
+ <a href="http://stoecklehauser.com/works/bernard_plossu/bernard_plossu_classic.html"><img src="http://stoecklehauser.com/images/bernard_plossu/plossu_classic/plossu_classic_1_portada.jpg" height="787" width="1181" alt=""/></a>
+ </p>
+
+
+ </div>
+
+
+
+ <div class="col-sm-6 col-md-4 col-lg-4 mb-md-50 wow fadeIn" data-wow-delay="0.1s" data-wow-duration="2s">
+
+ <p class="post-prev-img">
+ <a href="http://stoecklehauser.com/works/bernard_plossu/bernard_plossu_fressons.html"><img src="http://stoecklehauser.com/images/bernard_plossu/plossu_fressons/plossu_fressons_1_portada.jpg" height="787" width="1181" alt=""/></a>
+ </p>
+
+
+ </div>
+
+
+
+ <div class="col-sm-6 col-md-4 col-lg-4 mb-md-50 wow fadeIn" data-wow-delay="0.1s" data-wow-duration="2s">
+
+ <p class="post-prev-img">
+ <a href="http://stoecklehauser.com/works/bernard_plossu/bernard_plossu_la_nuit.html"><img src="http://stoecklehauser.com/images/bernard_plossu/plossu_la_nuit/plossu_la_nuit_1_portada.jpg" height="787" width="1181" alt=""/></a>
+ </p>
+
+
+ </div>
+
+
+
+ <div class="col-sm-6 col-md-4 col-lg-4 mb-md-50 wow fadeIn" data-wow-delay="0.1s" data-wow-duration="2s">
+
+ <p class="post-prev-img">
+ <a href="http://stoecklehauser.com/works/bernard_plossu/bernard_plossu_still_life.html"><img src="http://stoecklehauser.com/images/bernard_plossu/plossu_still_life/plossu_still_life_1_portada.jpg" height="753" width="1024" alt=""/></a>
+ </p>
+
+
+ </div>
+
+
+
+ <div class="col-sm-6 col-md-4 col-lg-4 mb-md-50 wow fadeIn" data-wow-delay="0.1s" data-wow-duration="2s">
+
+ <p class="post-prev-img">
+ <a href="http://stoecklehauser.com/works/bernard_plossu/bernard_plossu_europe.html"><img src="http://stoecklehauser.com/images/bernard_plossu/plossu_europe/plossu_europe_1_portada.jpg" height="787" width="1181" alt=""/></a>
+ </p>
+
+
+ </div>
+
+ </div>
+
+ </div>
+
+
+ </div>
+
+
+
+ </div></html> \ No newline at end of file
diff --git a/.gitconfig b/.gitconfig
index ce1249a..0dc4a88 100644
--- a/.gitconfig
+++ b/.gitconfig
@@ -7,3 +7,5 @@
rebase = false
[diff]
tool = vimdiff
+[init]
+ defaultBranch = master
diff --git a/.gitignore b/.gitignore
index 5606a13..df5ed1e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,4 +12,3 @@
.ssh/id_ed25519.pub
.ssh/known_hosts
.newsboat/history.search
-.config/qutebrowser