general cleanup

This commit is contained in:
Felix Van der Jeugt 2024-07-24 08:35:41 +02:00
parent ffced8fca4
commit 3ffb35cc2e
No known key found for this signature in database
GPG key ID: 58B209295023754D
25 changed files with 149 additions and 120 deletions

View file

@ -12,7 +12,7 @@ color = dark red
path = /data/calendar/default/default
[[sigasi]]
path = /data/calendar/sigasi/fzzurm
path = /data/calendar/sigasi/jbdhqd
color = dark blue
[[twist]]

View file

@ -1,2 +1,3 @@
audio_cache = false
gapless = true
audio_backend = "pipe"

View file

@ -1,8 +1,7 @@
#!/usr/bin/python
from qutebrowser.api import interceptor
from PyQt5.QtCore import QUrl, QUrlQuery
from unalix import clear_url
from PyQt6.QtCore import QUrl, QUrlQuery
config.backend = "webengine"
config.load_autoconfig(False)
@ -48,10 +47,6 @@ c.url.searchengines = { "startpage": "https://startpage.com/do/search?query={}"
, "mellowchan": "https://srx.mellowchan.xyz/?q={}"
, "DEFAULT": "https://srx.mellowchan.xyz/?q={}"
}
c.colors.webpage.preferred_color_scheme = "dark"
c.colors.webpage.darkmode.enabled = True
#c.colors.webpage.darkmode.policy.images = "never"
c.colors.webpage.bg = 'black'
# Privacy
c.content.proxy = "socks://localhost:9050"
@ -159,10 +154,10 @@ config.bind("<Alt+j>", "prompt-item-focus next", mode="prompt")
config.bind("<Alt+k>", "prompt-item-focus prev", mode="prompt")
config.bind("<Alt+l>", "fake-key -g /", mode="prompt")
config.bind("<Alt+h>", "rl-unix-filename-rubout", mode="prompt")
config.bind("o", "set-cmd-text -s :open -s ", mode="normal")
config.bind("O", "set-cmd-text -s :open -s -t ", mode="normal")
config.bind("\\", "set-cmd-text -s :open ", mode="normal")
config.bind("|", "set-cmd-text -s :open -t ", mode="normal")
config.bind("o", "cmd-set-text -s :open -s ", mode="normal")
config.bind("O", "cmd-set-text -s :open -s -t ", mode="normal")
config.bind("\\", "cmd-set-text -s :open ", mode="normal")
config.bind("|", "cmd-set-text -s :open -t ", mode="normal")
config.bind(";t", "hint links spawn --detach tempbrowser {hint-url}", mode="normal")
config.bind(";n", "hint links spawn --detach newbrowser {hint-url}", mode="normal")
config.bind("gt", "spawn --detach tempbrowser {url}", mode="normal")
@ -241,7 +236,7 @@ def intercept(info: interceptor.Request) -> None:
if not info.request_url.scheme().startswith('http'):
return
new_url = QUrl(clear_url(info.request_url.url()))
new_url = QUrl(info.request_url.url())
if new_host := redirects.get(new_url.host()):
new_url.setHost(new_host)

View file

@ -3,3 +3,5 @@ resume
stats.json
torrents
settings.json.tmp.*
stats.json.tmp.*
bandwidth-groups.json

View file

@ -6,11 +6,16 @@
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 50,
"announce-ip": "",
"announce-ip-enabled": false,
"anti-brute-force-enabled": false,
"anti-brute-force-threshold": 100,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
"blocklist-enabled": false,
"blocklist-url": "http://www.example.com/blocklist",
"cache-size-mb": 4,
"default-trackers": "",
"dht-enabled": true,
"download-dir": "/data/torrents",
"download-queue-enabled": true,
@ -21,7 +26,7 @@
"incomplete-dir": "/data/torrents",
"incomplete-dir-enabled": false,
"lpd-enabled": false,
"message-level": 1,
"message-level": 2,
"peer-congestion-algorithm": "",
"peer-id-ttl-hours": 6,
"peer-limit-global": 200,
@ -30,7 +35,7 @@
"peer-port-random-high": 65535,
"peer-port-random-low": 49152,
"peer-port-random-on-start": false,
"peer-socket-tos": "default",
"peer-socket-tos": "le",
"pex-enabled": true,
"port-forwarding-enabled": true,
"preallocation": 1,
@ -47,13 +52,18 @@
"rpc-host-whitelist-enabled": true,
"rpc-password": "{ea038685697d9155c4feac212ab27e76b9738fd5lYASTkIh",
"rpc-port": 9091,
"rpc-socket-mode": "0750",
"rpc-url": "/transmission/",
"rpc-username": "",
"rpc-whitelist": "127.0.0.1",
"rpc-whitelist-enabled": true,
"scrape-paused-torrents-enabled": true,
"script-torrent-added-enabled": false,
"script-torrent-added-filename": "",
"script-torrent-done-enabled": false,
"script-torrent-done-filename": "BLAH BLABLAH BLAH",
"script-torrent-done-seeding-enabled": false,
"script-torrent-done-seeding-filename": "",
"seed-queue-enabled": false,
"seed-queue-size": 10,
"speed-limit-down": 100,
@ -61,8 +71,10 @@
"speed-limit-up": 100,
"speed-limit-up-enabled": false,
"start-added-torrents": true,
"tcp-enabled": true,
"torrent-added-verify-mode": "fast",
"trash-original-torrent-files": false,
"umask": 18,
"umask": "022",
"upload-slots-per-torrent": 14,
"utp-enabled": true
}

View file

@ -21,7 +21,7 @@ password.fetch = ["command", "pass", "other/vdirsyncer"]
[pair posteo_arbeit]
a = "arbeit_local"
b = "arbeit_remote"
collections = ["fzzurm"]
collections = ["jbdhqd"]
[storage arbeit_local]
type = "filesystem"
@ -30,7 +30,7 @@ fileext = ".ics"
[storage arbeit_remote]
type = "caldav"
url = "https://posteo.de:8443/calendars/felix.vanderjeugt/fzzurmm/"
url = "https://posteo.de:8443/calendars/felix.vanderjeugt/jbdhqd/"
username = "felix.vanderjeugt@posteo.net"
password.fetch = ["command", "pass", "other/vdirsyncer"]
@ -54,6 +54,7 @@ password.fetch = ["command", "pass", "other/vdirsyncer"]
a = "contacts_local"
b = "contacts_remote"
collections = ["from a", "from b"]
conflict_resolution = "a wins"
[storage contacts_local]
type = "filesystem"
@ -65,17 +66,3 @@ type = "carddav"
url = "https://posteo.de:8843/addressbooks/felix.vanderjeugt/default"
username = "felix.vanderjeugt@posteo.net"
password.fetch = ["command", "pass", "other/vdirsyncer"]
[pair stellaris]
a = "stellaris_remote"
b = "readonly_local"
collections = null
[storage readonly_local]
type = "filesystem"
path = "/data/calendar/readonly"
fileext = ".ics"
[storage stellaris_remote]
type = "http"
url = "https://cloud.rxn.be/remote.php/dav/public-calendars/fzNBCHE6EBffA6Ft?export"

View file

@ -40,25 +40,25 @@ local hr = token('hr', lpeg.Cmt(l.starts_line(S(' \t')^0 * lpeg.C(S('*-_'))),
end))
-- Span elements.
local dq_str = token(l.STRING, l.delimited_range('"', false, true))
local sq_str = token(l.STRING, l.delimited_range("'", false, true))
local paren_str = token(l.STRING, l.delimited_range('()'))
local link = token('link', P('!')^-1 * l.delimited_range('[]') *
local dq_str = token(l.STRING, l.range('"', false, true))
local sq_str = token(l.STRING, l.range("'", false, true))
local paren_str = token(l.STRING, l.range('()'))
local link = token('link', P('!')^-1 * l.range('[]') *
(P('(') * (l.any - S(') \t'))^0 *
(S(' \t')^1 *
l.delimited_range('"', false, true))^-1 * ')' +
S(' \t')^0 * l.delimited_range('[]')) +
l.range('"', false, true))^-1 * ')' +
S(' \t')^0 * l.range('[]')) +
P('http://') * (l.any - l.space)^1)
local link_label = token('link_label', l.delimited_range('[]') * ':') * ws *
local link_label = token('link_label', l.range('[]') * ':') * ws *
token('link_url', (l.any - l.space)^1) *
(ws * (dq_str + sq_str + paren_str))^-1
local strong = token('strong', (P('**') * (l.any - '**')^0 * P('**')^-1) +
(P('__') * (l.any - '__')^0 * P('__')^-1))
local em = token('em',
l.delimited_range('*', true) + l.delimited_range('_', true))
l.range('*', true) + l.range('_', true))
local code = token('code', (P('``') * (l.any - '``')^0 * P('``')^-1) +
l.delimited_range('`', true, true))
l.range('`', true, true))
local escape = token(l.DEFAULT, P('\\') * 1)

View file

@ -21,6 +21,13 @@ vis.events.subscribe(vis.events.WIN_OPEN, function(win)
vis:command('set number')
end)
vis.events.subscribe(vis.events.FILE_SAVE_PRE, function(file, path)
if file.size ~= 0 and file:content(file.size - 1, 1) ~= "\n" then
file:insert(file.size, "\n")
end
return true
end)
vis:map(vis.modes.NORMAL, ";;", "<vis-window-next>")
--------------------------------------------------------------------------------
@ -34,6 +41,15 @@ vis:map(vis.modes.NORMAL, "<Escape>", function()
end
end)
--------------------------------------------------------------------------------
-- Fancy cd
vis:command_register("rcd", function(argv, force, cur_win, selection, range)
handle = io.popen('f=$(mktemp); st -e ranger --choosedir="$f" --show-only-dirs; cat "$f"')
local output = handle:read()
handle:close()
vis:command('cd '..output)
end)
--------------------------------------------------------------------------------
-- Fuzzy search filenames to open files