mirror of
https://github.com/Phantop/dotfiles
synced 2024-12-22 21:26:47 +00:00
qute: dns over wikipedia script, gothub, 4get fly
This commit is contained in:
parent
1f431d5d00
commit
32f6847ed6
6
archpkgs
6
archpkgs
|
@ -23,6 +23,7 @@ clang
|
|||
cmake
|
||||
cpupower
|
||||
dart-sass
|
||||
dnsmasq
|
||||
doas-sudo-shim
|
||||
dolphin-emu
|
||||
dolphin-emu-tool
|
||||
|
@ -38,6 +39,7 @@ fwupd
|
|||
fzf
|
||||
gallery-dl
|
||||
game-devices-udev
|
||||
gdb
|
||||
gifsicle
|
||||
git
|
||||
gitui
|
||||
|
@ -46,6 +48,7 @@ gnome-power-manager
|
|||
gron
|
||||
hblock
|
||||
httrack
|
||||
hypnotix
|
||||
ifuse
|
||||
imagemagick
|
||||
innoextract
|
||||
|
@ -59,6 +62,7 @@ jless
|
|||
jpegoptim
|
||||
jq
|
||||
keepassxc
|
||||
kernel-headers-musl
|
||||
kitty
|
||||
kvantum
|
||||
lagrange
|
||||
|
@ -78,6 +82,7 @@ mandoc
|
|||
megatools
|
||||
meld
|
||||
meson
|
||||
miniflux
|
||||
moreutils
|
||||
mpv-mpris
|
||||
msitools
|
||||
|
@ -130,6 +135,7 @@ ripgrep-all
|
|||
rofi
|
||||
rsync
|
||||
runc
|
||||
rustup
|
||||
smartmontools
|
||||
sof-firmware
|
||||
squashfs-tools
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
a=c.aliases
|
||||
a['re'] = 'restart'
|
||||
a['idk'] = 'spawn -u wikidns'
|
||||
a['css-reload'] = 'set content.user_stylesheets user.css'
|
||||
a['scss-reload'] = 'spawn -u /bin/bash -c "sass $QUTE_CONFIG_DIR/user.{s,}css"'
|
||||
a['remove-sticky'] = 'jseval -q document.querySelectorAll("*").forEach(e=>{["sticky","fixed"].includes(getComputedStyle(e).position)&&e.parentNode.removeChild(e)})'
|
||||
|
|
|
@ -38,6 +38,8 @@ def stackoverflow (url: QUrl) -> bool:
|
|||
return farside(url, '/anonymousoverflow/')
|
||||
def wikipedia(url: QUrl) -> bool:
|
||||
return farside(url, '/wikiless/')
|
||||
def github(url: QUrl) -> bool:
|
||||
return farside(url, '/gothub/')
|
||||
|
||||
m = {
|
||||
"reddit.com": reddit,
|
||||
|
@ -65,6 +67,7 @@ m = {
|
|||
"genius.com" : genius,
|
||||
"stackoverflow.com" : stackoverflow,
|
||||
"en.wikipedia.org" : wikipedia,
|
||||
"gothub.com" : github,
|
||||
|
||||
"www.twitch.tv" : o(s, 'twineo.exozy.me'),
|
||||
"discord.com" : o(s, 'canary.discord.com'),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
c.url.searchengines['!'] = 'farside.link/librey/search.php?q=!{}'
|
||||
c.url.searchengines['4'] = 'farside.link/4get/web?s={}'
|
||||
c.url.searchengines['4'] = '4get.lvkaszus.pl/web?s={}'
|
||||
c.url.searchengines['4'] = '4get.fly.dev/web?s={}'
|
||||
c.url.searchengines['a'] = 'annas-archive.org/search?q={}'
|
||||
c.url.searchengines['aw'] = 'wiki.archlinux.org/title/{}'
|
||||
c.url.searchengines['l'] = 'farside.link/librey/search.php?q={}'
|
||||
|
@ -10,4 +10,4 @@ c.url.searchengines['s'] = 'farside.link/searxng/search?q={}'
|
|||
c.url.searchengines['w'] = 'farside.link/wikiless/wiki/{}?lang=en'
|
||||
c.url.searchengines['y'] = 'farside.link/invidious/search?q={}'
|
||||
c.url.searchengines['z'] = 'zeldawiki.wiki/wiki/{}'
|
||||
c.url.searchengines['DEFAULT'] = c.url.searchengines['l']
|
||||
c.url.searchengines['DEFAULT'] = c.url.searchengines['4']
|
||||
|
|
5
qutebrowser/userscripts/wikidns
Executable file
5
qutebrowser/userscripts/wikidns
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
search=$(echo "$@" | tr ' ' +)
|
||||
query='https://en.wikipedia.org/w/api.php?action=query&list=search&format=json&srsearch='
|
||||
wikiurl="https://en.wikipedia.org/wiki/$(curl "$query$search"| jq -r .query.search[0].title | sed 's/ /%20/')"
|
||||
echo open "$(curl -L "$wikiurl" | pup '.infobox .url a.external attr{href}' | tail -n1)" >> "$QUTE_FIFO"
|
Loading…
Reference in a new issue