mirror of
https://github.com/Phantop/dotfiles
synced 2024-12-26 15:06:50 +00:00
Qute: update readability; Setup: Solus starship
This commit is contained in:
parent
fcae40a461
commit
cff0641107
|
@ -11,7 +11,7 @@ hwdec=yes
|
|||
|
||||
audio-file-auto=exact
|
||||
audio-file-paths=../Custom Tracks:./Custom Tracks:../Audio:./Audio
|
||||
sub-file-paths=../Subtitles:./Subtitles
|
||||
sub-file-paths=../Subtitles:./Subtitles:../Subs:./Subs
|
||||
use-filedir-conf
|
||||
|
||||
sub-font=Funimitation
|
||||
|
|
|
@ -50,7 +50,9 @@ c.aliases['dotepub'] = "jseval -u -q javascript:(function()%7Btry%7Bvar%20d=docu
|
|||
config.bind('se', "dotepub")
|
||||
c.aliases['remove-sticky'] = "jseval -u -q javascript:(function()%7B%20let%20i%2C%20elements%20%3D%20document.querySelectorAll('body%20*')%3B%20for%20(i%20%3D%200%3B%20i%20%3C%20elements.length%3B%20i%2B%2B)%20%7B%20if(getComputedStyle(elements%5Bi%5D).position%20%3D%3D%3D%20'fixed'%20%7C%7C%20getComputedStyle(elements%5Bi%5D).position%20%3D%3D%3D%20'sticky')%7B%20elements%5Bi%5D.parentNode.removeChild(elements%5Bi%5D)%3B%20%7D%20%7D%20%7D)()"
|
||||
config.bind('sr', "remove-sticky")
|
||||
|
||||
config.bind('<Ctrl-r>', 'spawn -u readability')
|
||||
config.bind('<Ctrl-Shift-R>', "spawn kitty rdrview -B qutebrowser {url}")
|
||||
|
||||
config.bind('st', 'config-cycle -t content.proxy socks://localhost:9050/ system')
|
||||
config.bind('sc', 'config-cycle -t content.user_stylesheets adapta.css ""')
|
||||
|
@ -64,9 +66,13 @@ accent = '#5294E2'
|
|||
cc = c.colors
|
||||
cct = cc.tabs
|
||||
ccc = cc.completion
|
||||
ccw = cc.webpage
|
||||
|
||||
cc.webpage.prefers_color_scheme_dark = True
|
||||
|
||||
ccwd = ccw.darkmode
|
||||
ccwd.enabled = False
|
||||
|
||||
ccc.category.bg = guicol
|
||||
ccc.scrollbar.bg = guicol
|
||||
cc.downloads.bar.bg = guicol
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
#!/usr/bin/env python3
|
||||
# Creates a reader mode view of the current webpage
|
||||
#
|
||||
# Executes python-readability on current page and opens the summary as new tab.
|
||||
#
|
||||
# Depends on the python-readability package, or its fork:
|
||||
#
|
||||
# - https://github.com/buriy/python-readability
|
||||
# - https://github.com/bookieio/breadability
|
||||
# Depends on the python-readability (lxml) package:
|
||||
# - http://github.com/buriy/python-readability
|
||||
#
|
||||
# Usage:
|
||||
# :spawn --userscript readability
|
||||
#
|
||||
# :spawn -u readability
|
||||
|
||||
from __future__ import absolute_import
|
||||
import codecs, os
|
||||
|
||||
|
@ -33,16 +30,10 @@ HEADER = """
|
|||
with codecs.open(os.environ['QUTE_HTML'], 'r', 'utf-8') as source:
|
||||
data = source.read()
|
||||
|
||||
try:
|
||||
from breadability.readable import Article as reader
|
||||
doc = reader(data)
|
||||
title = doc._original_document.title
|
||||
content = HEADER % title + doc.readable + "</html>"
|
||||
except ImportError:
|
||||
from readability import Document
|
||||
doc = Document(data)
|
||||
title = doc.title()
|
||||
content = doc.summary().replace('<html>', HEADER % title)
|
||||
from readability import Document
|
||||
doc = Document(data)
|
||||
title = doc.title()
|
||||
content = doc.summary().replace('<html>', HEADER % title)
|
||||
|
||||
with codecs.open(tmpfile, 'w', 'utf-8') as target:
|
||||
target.write(content.lstrip())
|
||||
|
|
|
@ -11,3 +11,4 @@ meson --prefix=/usr build
|
|||
sudo printf ''
|
||||
ninja -C build
|
||||
sudo ninja -C build install
|
||||
sudo solbuild build package.yml -d
|
||||
|
|
17
.setup
17
.setup
|
@ -1,16 +1,18 @@
|
|||
#!/bin/bash
|
||||
sudo eopkg up
|
||||
sudo eopkg it -c system.devel
|
||||
gnome=$(eval echo eog file-roller gnome-{calendar,photos,mpv,terminal} nautilus onboard rhythmbox)
|
||||
sudo eopkg rm celluloid firefox $gnome hexchat libreoffice-common thunderbird
|
||||
gnome=$(eval echo eog evolution-data-server file-roller gnome-{calendar,photos,mpv,terminal} nautilus onboard rhythmbox)
|
||||
sudo eopkg rm celluloid firefox $gnome hexchat libreoffice-common thunderbird transmission
|
||||
|
||||
audio="audacious audacious-plugins audacity opus-tools quodlibet spek"
|
||||
dev="ccache docker-compose git-extras neovim openssh-server parallel solbuild tig tor upx"
|
||||
gui="bleachbit caja engrampa goverlay keepassx kitty libstrangle qutebrowser"
|
||||
media="feh gmic-gimp jpegoptim mpv playerctl usbmuxd rsync viewnior zathura-poppler"
|
||||
rice="adapta-gtk-theme devilspie2 font-ubuntu-ttf rofi stow"
|
||||
rice="adapta-gtk-theme devilspie2 font-ubuntu-ttf rofi starship stow"
|
||||
term="advancecomp aria2 autojump fd fish fzf innoextract most ncdu p7zip ripgrep rsync tmux"
|
||||
|
||||
sudo eopkg it $audio $dev $gui $media $rice $term
|
||||
sudo eopkg rm --ignore-dependency tracker
|
||||
pip3 install --user pipipxx readability-lxml
|
||||
|
||||
rm ~/.bashrc
|
||||
|
@ -26,15 +28,10 @@ curl https://api.github.com/repos/bloc97/Anime4K/releases/latest | grep -wo http
|
|||
aria2c https://github.com/junegunn/vim-plug/raw/master/plug.vim -d ~/.config/nvim/autoload
|
||||
nvim +PlugUpdate +q +q
|
||||
|
||||
chsh -s /usr/bin/fish
|
||||
|
||||
sh -c "$(curl -sL https://nextdns.io/install)"
|
||||
sudo nextdns install
|
||||
sudo nextdns start
|
||||
|
||||
sudo systemctl mask tracker-{store,mine-fs,miner-rss,extra,miner-apps,writeback}
|
||||
sudo systemctl mask tracker-{store,miner-fs,miner-rss,extra,miner-apps,writeback}
|
||||
sudo systemctl enable --now docker tor
|
||||
sudo usermod -aG docker $USER
|
||||
chsh -s /usr/bin/fish
|
||||
|
||||
git g gh:Phantop/solus-stuff ~/.solus
|
||||
git g gh:iv-org/invidious ~/.invidious
|
||||
|
|
Loading…
Reference in a new issue