Commit graph

106 commits

Author SHA1 Message Date
d69a0f40e1
qutebrowser: Make xdg-utils optional
Replace all hard-coded instances of using xdg-open with at least one
non-xdg alternative. Mostly falling back to either mimeo or a custom
open script.
2025-03-19 21:30:02 +01:00
2f618d65d5
qutebrowser: Remove xdg-utils dependency from recently-downloaded
First uses the 'open' command if there is one, then the 'mimeo' command
and only then falls back to 'xdg-open'.
2025-03-19 21:30:01 +01:00
5f6627e7e7
qutebrowser: Add hypothesis annotation function
Can be activated through the command alias ':hypothesis' or just the
shortcut `<localleader>+a`, so `,a`.
2025-03-19 21:29:58 +01:00
930cbbc47c
qutebrowser: Switch out shaarli integrations for linkding
Use linkding for the 'l' search engine and add a linkding adding
userscript which we use with the ";s" keymap. Add user command
'add-linkding'.
2025-03-16 00:52:43 +01:00
41754c5d24
qutebrowser: Fallback to wezterm terminal by default
Since the starting parameters are fairly hardwired for wezterm anyway I
don't see this making much sense with e.g. xterm. However, long-term, we
should rather change the hard-dependency instead of doing it this way.
2025-03-10 20:22:04 +01:00
6af3ba52dc qutebrowser: Add shellcheck search engine
Just run `sc <diagnosis number>` and you will instantly be beamed to the
correcsponding shellcheck wiki error page.

E.g. `sc 3001` will transport you to 'In POSIX sh, process substitution
is undefined'.
2025-02-24 14:22:36 +01:00
e3742d43ec fonts: Fix for Iosevka on Voidlinux
Prefer regular 'Iosevka' font in most cases, not the highly specific
'Iosevka Nerd Font'. This may break some things back in Archlinux-land
but it is required for iosevka to be correctly displayed in Voidlinux,
and, to be honest, also feels more clean than using such a highly
specialized font for everything.

Additionally, we generally make use of both where possible, defaulting
to the more specific 'Nerd Font' family variant but falling back to
regular old Iosevka.

One exception is 'wezterm' which, though it nicely includes a font
fallback option (and a very configurable one at that), _always_ produces
a warning when the first font in a fallback list is not found -- even
when the specific 'warn_about_missing_glyphs' option is ticked. No clue
why but for now this works well enough for me.
2025-02-24 14:22:36 +01:00
b8bc65dfab qutebrowser: Add void packages to searchengines
Using `void <searchterm>` the void package repositories can now be
searched.
2025-02-23 19:14:35 +01:00
987e4459bf qutebrowser: Manually redirect youtube
Since farside is apparently also not capable of correctly redirecting to
invidious (the one functioning instance), we are doing it manually.
2025-02-22 21:28:34 +01:00
86306afc08
qutebrowser: Manually redirect to FOSS genius frontends
Since farside linking currently does not work we take the work into our
own hands.
2025-02-22 19:35:33 +01:00
637230ad04
qutebrowser: Enable javascript for docker hub 2025-02-18 17:58:37 +01:00
969e0a6288
qutebrowser: Refactor redirects as importable class
Make more extensive using of dataclasses for typing and simpler future
refactors.

The redirects 'plugin' is now a simple class which can be imported into
the configuration and is automatically active when instantiated. For
that to work it needs access to the qutebrowser python library but that
should hopefully be a given if wanting to have a qutebrowser plugin.

To make the default redirects active, simply import the class and
instantiate it:

```python
from fossredirect import Redirects
_ = Redirects()
```

This loads the defaults and activates them in qutebrowser. Try to go to
e.g. 'reddit.com' and it will automatically open in a libreddit
frontend.
To customize the redirects, provide a custom list of Services:

```python
from fossredirect import Redirects
_ = Redirects(services=[Service(source=["fromhere.com"], target=["tohere"])])
```

It works a little more flexibly now:
Redirects contains a list of Services.
Each service is a simple data container with the following:

```python
Service(
     source=["list.of", "hosts.to", "redirect.com"],
     target=["farside-redirect"]
)
```

The above redirects any of the source hosts to the far-side provided
target (in this case it would be
`farside.link/farside-redirect/<original-path>`).

However we can also specify 'custom' targets if farside does not have a
service that we want to redirect.

```python
Service(
     source=["list.of", "hosts.to", "redirect.com"],
     target=["my-redirected-host.org"],
     custom_targets=True
)
```

This directly rewrites the host to
`https://my-redirected-host.org/<original-path>`.

Lastly, we can have custom preprocess/postprocess functions which fix
some more involved redirect:

```python
Service(
     source=["list.of", "hosts.to", "redirect.com"],
     target=["my-redirected-host.org"],
     postprocess=lambda item: item
)
```

Be aware that the functions take 'QUrl' objects so you have to access
e.g. the actual host with `item.host()` before rewriting. Look at the
breezewiki rewrite function for an easy example.
2025-02-18 17:58:11 +01:00
0237b7d569
qutebrowser: Replace defunct qwant maps with facilmap
I would love to replace it with osmapp instead but have not found a way
to send a query in a qutebrowser-enabled post format.
2025-01-04 10:48:16 +01:00
59677f3b9c
qutebrowser: Include sessions into qutedmenu script
If 'yq' is found on the system, the qutedmenu script will now also
traverse any saved sessions for urls (either active or historic) and
display those as well.

Also added a simple check for the sqlite3 and yq tools and spit out a
warning if either isn't found. Program will continue unhindered and just
ignore the history/session urls respectively.
2025-01-03 22:32:55 +01:00
bd29839910
qutebrowser: Fix visual selection errors, typehints 2024-08-12 21:26:29 +02:00
9a7b8c824d
qutebrowser: Switch to html ddg startpage 2024-07-20 16:44:35 +02:00
01809f1ee5
qutebrowser: Add bookwyrm search engine 2024-07-03 09:46:42 +02:00
d99c908ac3
qutebrowser: Use fastside for redirects by default
Default to fastside.link instead of farside.link.
2024-06-27 17:36:06 +02:00
fa48961f4a
qutebrowser: Rename docker hub search engine
Renamed from `docker` to `hub` since I otherwise always accidentally
search the actual docker hub when I want to find solutions for docker
issues.

Also sorted search engines alphabetically.
2024-06-25 11:35:23 +02:00
dfcd7cc1a5
qutebrowser: Add boardgamegeek search engine shortcut
Added `bgg <searchterm>` to quickly search the website for boardgames.
2024-05-28 21:27:17 +02:00
719d019ee3
qutebrowser: Add redirects for goodreads, twitch
Added privacy-aware redirects for goodreads (biblioreads) and
twitch (safetwitch). Safetwitch unfortunately requires
javascript enabled but is still heaps lighter of a website
than the official streaming one.

Farside does not offer redirects for these services yet so we
keep a manual list to redirect to for the time being.
2024-04-19 11:31:38 +02:00
ab4a0154c6
qutebrowser: Fix scihub script to use wikipedia
When looking for the most up-to-date link to grab a scihub url
we used to use wikiless but now simply directly scrape from
wikipedia.
Functionality is not changed but should work much faster and
more reliably.
2024-04-19 11:30:12 +02:00
69da2610f4
qutebrowser: Add oss redirect for askubuntu 2024-02-24 09:42:30 +01:00
20b9d432ac
qutebrowser: Use farside for dynamic redirects
The redirector can now be fed with either a list of targets to pick from
(as before) or a "farside" entry which points to a farside service
redirect or multiple.

The dict entry then looks like:

```python
"quora": {
    "source": ["quora.com"],
    "farside": ["quetre"],
}
```

It has the source service url as usual, but then instead of a "target"
entry contains a "farside" entry.

A redirect dict entry can take both "target" and "farside" entries, but
will then always give precedence to farside choices.

This should go a long way in helping keep OSS frontends up to date. It
now mostly depends on farside entries in turn being updated.
One potential concern is the new centralization in relying on farside as
the redirect authority.
2024-02-05 12:16:09 +01:00
b0bcb9dd60
qutebrowser: Remove wikipedia redirects
These are the redirects that made the most trouble for me, and honestly I
do not think wikipedia really belongs in the same category of 'necessary
to redirect' surveillance pages like reddit,instagram or twitter.
2023-12-12 12:21:01 +01:00
9bd4a80be8
qutebrowser: Update reddit redirects
Updated reddit redirects once again.
Will soon have to figure out a different way of
approaching the lib- redirections with so many
services blocking/throttling/shutting down the
FOSS frontends. For now, I will bear with it.
2023-12-04 08:38:35 +01:00
4cc03a611a
sh: Add default open script
Simple wrapper for xdg-open functionality. Simply refers
to xdg-open except if there exists mimeo on the system
which it will refer to instead.

So, a simple preference modificator for mimeo over
xdg-open since that is my preference too.

Also gave it a short name so I can do open whenever I
want and don't have to tax my left hand with tying xdg.
2023-12-04 08:26:59 +01:00
0d26c245ae
qutebrowser: Update invidious redirects 2023-11-15 14:24:27 +01:00
5b2a55cfe3
qutebrowser: Remove qute-cookie-block script
Never completely functioned and worked to my satisfaction.
Need to find another tool or just accept the reality of
cookie banners.
2023-10-03 13:55:24 +02:00
8681d34946
qutebrowser: Make use of dotter for dir structure
Since we now use dotter we can simplify the dir structure for
qutebrowser a lot. Everything dot-filed earlier can now reside
in simple directories called config (for ~/.config/qutebrowser),
data (for ~/.local/share/qutebrowser), and scripts
(for ~/.local/bin) files.
2023-10-03 13:43:00 +02:00
587a46ccb7
qutebrowser: Disable canvas fingerprinting
Do not allow html5 canvas reading in qutebrowser. This shuts off one of the main
avenues of browser fingerprinting (aside from cookies) still currently
undertaken. It will possibly stop some obscure streaming sites from working but
I do not care, especially at the cost of fingerprinting information.
2023-10-02 19:14:25 +02:00
48229fc742
qutebrowser: Set tab display length to 2 seconds
When not showing tabs (only displaying them on actually
switchting between tabs), so far the duration that the
tabs would be displayed was just 800ms, way too short
to actually provide legible info.

This commit changes it to 2000ms, which may still be
too short but is at least more digestible.
2023-10-02 19:12:56 +02:00
6254c92bd3
chore: Update qutebrowser redirects, nvim spellfiles 2023-09-16 11:29:22 +02:00
6e8132d311
qutebrowser: Try to fix medium redirects 2023-08-29 22:45:09 +02:00
c781693c26
qutebrowser: Change qute-gemini to open tab related
Using the userscript qute-gemini to open any tabs
(if invoked as qute-gemini-tab) to be related to
the current tab.
2023-08-25 16:32:22 +02:00
4994e9782d
qutebrowser: Remove gemini shortcut from main link
Main linking buttons (f/F) *can* be used for this but the resulting
userscript has to account for many more different scenarios than
opening a page.

If it does not, we can not 'click' on text entry fields, dropdowns,
sliders etc with the f-buttons anymore.

This commit switches the qute-gemini script to be invoked via ,g or ,G
thus with the local leader mapping instead.
2023-08-25 16:24:25 +02:00
ae58c1c4ef
qutebrowser: Slightly refactor translate & codegrab
Code grabbing has been slightly refactored to always check for the
existence of the qutebrowser fifo before sending anything.

Translate has been fixed up a little to use lingva for selection
translations, only falling back to google translate for complete page
translations since I do not think any other services support this for
now.
2023-08-08 17:12:53 +02:00
f7304b8941
qutebrowser: Refactor gemini userscript
Now possibly a little less clunky (though still using soon-to-be
deprecated modules), and able to correctly surf gemini/non-gemini pages
as a userscript or as a stand-alone script (simply calling it from
command line).

Works as before for tabbed pages (the clunky rename/symlink way).

Can now also be used as the default way to surf to links so I switched
out my qutebrowser f/F link hinting for this script. Will simply open
links if staying on http but open gemini version as local file if moving
on to gemini.

Could probably be rewritten as an actual plugin to interject itself in
link opening to be a little more elegant (similar to the redirect code I
have running to move to open source web frontends).
2023-08-08 15:52:12 +02:00
f09a75820e
qutebrowser: Improve shaarli/wallabag bookmarkers
Both bookmarkers can now either send the current page ("s for sending to
shaarli; "w to send to wallabag) or send any link on the current page
(;s for shaarli, ;w for wallabag).

Both have been adapted to the same format, both can be sent a link as an
argument as well (./wallabag_add.sh 'myawesome.blog/entry').
2023-08-08 12:05:41 +02:00
b58bd2767d
qutebrowser: Make recently downloaded executable
Moved the qutebrowser userscript to open recently downloaded files
to be accessible as a normal shell script as well
(`recently-downloaded`).

Mapped this to Super+Shift+D in riverwm to be easily able to open
the most recent downloads from anywhere.

Double the default lines shown to 20.
2023-08-08 11:38:25 +02:00
7662c5b776
qutebrowser: Remove blocked hosts from repo
Blocked hosts reside in a single (giant) plaintext file, which we
now remove from the repository.

Especially with the new blocking sources we grew from around 700k
(which was already a lot at ~35000 lines) to around 5MB which is
just stupid to keep in the git repo if we don't have to.
Since qutebrowser automatically re-creates the file for us on
running `:adblock-update` there's no reason to waste space here.
2023-08-08 11:24:41 +02:00
dc3b2cf12e
qutebrowser: Update redirects 2023-06-22 12:38:19 +02:00
7121897385
qutebrowser: Add URL rewriting for scribe redirects
Scribe links are often not redirected correctly if belonging to medium's
'global-identity' redirections. This is a first attempt at fixing those
by removing the superfluous string from the scribe URL.

Generalized enough to work as a 'post-processing' function for the
redirection plugin, which can be set up by pointing the 'postprocess'
key of a page entry to a callable object (most likely a function).
2023-05-23 15:42:03 +02:00
337b250aba
qutebrowser: Fix bare redirect exception 2023-03-22 11:48:57 +01:00
617872463b
qutebrowser: Add annas archive search engine 2023-03-21 18:58:35 +01:00
395ae723b9
qutebrowser: Update redirects 2023-03-21 18:56:17 +01:00
6dd08327d8
qutebrowser: Switch youtube search engine back to yewtube 2023-03-09 21:19:27 +01:00
c59b617da5
qutebrowser: Fix external textbox editor
Fixed text not flowing to the external (nvim) editor and saved text not
being brought back into qutebrowser.
Same issue as here https://github.com/qutebrowser/qutebrowser/issues/6707
it essentially amounts to the terminal not having its own running
process id which qutebrowser uses to know when the application closes.
Thus, it thinks it closes immediately and deletes the temporary file. No
changes are brought back and the file is empty for the editor.
With the fix, this does not happen anymore.
2023-03-09 21:17:24 +01:00
ec20d637c0
qutebrowser: Source colorscheme file from xdg state dir 2023-03-03 18:48:55 +01:00
c92afad510
qutebrowser: Removed offline server redirect 2023-03-03 12:54:29 +01:00