1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2025-03-21 01:19:25 +00:00

Qute: use Invidious on port 80/general clean up

This commit is contained in:
Phantop 2020-12-28 14:14:15 -05:00
parent cff0641107
commit e51136dd77
6 changed files with 45 additions and 38 deletions

View file

@ -1,3 +0,0 @@
function seh -w eopkg
s eopkg history $argv
end

View file

@ -4,7 +4,7 @@ nittr = 'nitter.snopyta.org'
# BEGIN MAIN CONFIGURATION #
c.url.default_page = "https://feedly.com/i/my"
c.url.start_pages = ["https://duck.com/?q=20m+timer"]
c.url.searchengines = {"DEFAULT": "duck.com/?q={}", "y": "localhost:3000" + "/search?q={}"}
c.url.searchengines['y'] = "localhost" + "/search?q={}"
c.completion.open_categories = ["quickmarks", "bookmarks", "history"]
c.tabs.show = "multiple"
@ -22,8 +22,9 @@ c.confirm_quit = ["downloads"]
c.scrolling.smooth = True
hosts = c.content.host_blocking.lists
hosts.append("https://raw.githubusercontent.com/jmdugan/blocklists/master/corporations/facebook/all")
hosts.append("https://raw.githubusercontent.com/jmdugan/blocklists/master/corporations/microsoft/all")
hosts.append("https://github.com/jmdugan/blocklists/raw/master/corporations/facebook/all-but-whatsapp")
hosts.append("https://github.com/jmdugan/blocklists/raw/master/corporations/microsoft/all")
hosts.append("https://github.com/jmdugan/blocklists/raw/master/corporations/twitter/all")
hosts.append("https://github.com/Perflyst/PiHoleBlocklist/raw/master/AmazonFireTV.txt")
config.set('content.register_protocol_handler', True, 'https://mail.tutanota.com')
@ -36,28 +37,27 @@ config.set('content.persistent_storage', True, 'https://mega.nz')
# BINDINGS #
config.bind('<Ctrl-q>', 'close')
config.bind('<Ctrl-w>', 'tab-close')
config.bind('c1', "download-open")
config.bind('sd', "spawn fish -c 'dl; open (ls | rofi -dmenu -b -i || exit 0)'")
c.aliases['mpv'] = "spawn -m -d -v mpv --ytdl-raw-options=write-sub=,write-auto-sub=,embed-subs=,sub-lang=en}"
config.bind('<Ctrl-m>', 'mpv {url}')
config.bind('<Ctrl-Shift-M>', 'mpv --ytdl-format=bestvideo[vcodec^=avc1]+bestaudio {url}')
config.bind('<,>', 'hint links run mpv {hint-url}')
config.bind('m', 'mpv {url}')
config.bind('M', 'mpv --ytdl-format=bestvideo[vcodec^=avc1]+bestaudio {url}')
config.bind(';m', 'hint links run mpv {hint-url}')
config.bind(',', 'hint links run mpv {hint-url}')
config.bind('sq', 'open qr {url}')
config.bind('sa', 'open https://archive.is/?run=1&url={url}')
config.bind('sw', 'open https://conifer.rhizome.org/record/{url}')
config.bind('se', 'open https://dotepub.com/converter/?url={url}&fmt=epub')
c.aliases['dotepub'] = "jseval -u -q javascript:(function()%7Btry%7Bvar%20d=document,w=window;if(!d.body%7C%7Cd.body.innerHTML=='')throw(0);var%20s=d.createElement('link'),h=d.getElementsByTagName('head')[0],i=d.createElement('div'),j=d.createElement('script');s.rel='stylesheet';s.href='//dotepub.com/s/dotEPUB-favlet.css';s.type='text/css';s.media='screen';h.appendChild(s);i.setAttribute('id','dotepub');i.innerHTML='%3Cdiv%20id=%22status%22%3E%3Cp%3EConversion%20in%20progress...%3C/p%3E%3C/div%3E';d.body.appendChild(i);j.type='text/javascript';j.charset='utf-8';j.src='//dotepub.com/j/dotepub.js?v=1.2&s=ask&t=epub&g=en';h.appendChild(j);%7Dcatch(e)%7Bw.alert('The%20page%20has%20no%20content%20or%20it%20is%20not%20fully%20loaded.%20Please,%20wait%20till%20the%20page%20is%20loaded.');%7D%7D)();"
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")
c.aliases['remove-sticky'] = 'jseval -q !function(){var e,o=document.querySelectorAll("body *");for(e=0;e<o.length;e++)["sticky","fixed"].includes(getComputedStyle(o[e]).position)&&o[e].parentNode.removeChild(o[e])}();'
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 ""')
config.bind('sd', "spawn fish -c 'xdg-open ~/Downloads/(ls ~/Downloads | rofi -location 6 -dmenu -i || exit 0)'")
# APPEARANCE #
guicol = '#222D32'
@ -68,10 +68,9 @@ cct = cc.tabs
ccc = cc.completion
ccw = cc.webpage
cc.webpage.prefers_color_scheme_dark = True
ccwd = ccw.darkmode
ccwd.enabled = False
ccw.prefers_color_scheme_dark = True
ccwd.enabled = False
ccc.category.bg = guicol
ccc.scrollbar.bg = guicol
@ -133,3 +132,12 @@ def int_fn(info: interceptor.Request):
if redir is not None and redir(url) is not False:
info.redirect(url)
interceptor.register(int_fn)
# DRACULA #
#import dracula.draw
#dracula.draw.blood(c, {
# 'spacing': {
# 'vertical': 1,
# 'horizontal': 0
# }
#})

View file

@ -1,9 +0,0 @@
rofi.drun-icon-theme: Haiku
rofi.show-icons: true
rofi.color-normal: argb:2c263238, #c4cbd4, argb:2c263238, #5294E2, #f9f9f9
rofi.color-urgent: argb:2c263238, #cc6666, argb:e54b5160, #a54242, #f9f9f9
rofi.color-active: argb:2c263238, #65acff, argb:e44b5160, #4491ed, #f9f9f9
rofi.color-window: argb:f2263238, #7c8389, #263238
rofi.separator-style: none
rofi.run-command: fish -c '{cmd}'
rofi.run-list-command: 'fish -c functions'

11
.config/rofi/config.rasi Normal file
View file

@ -0,0 +1,11 @@
configuration {
show-icons: true;
run-command: "fish -c '{cmd}'";
run-list-command: "'fish -c functions'";
separator-style: "none";
color-normal: "argb:2c263238, #c4cbd4, argb:2c263238, #5294E2, #f9f9f9";
color-urgent: "argb:2c263238, #cc6666, argb:e54b5160, #a54242, #f9f9f9";
color-active: "argb:2c263238, #65acff, argb:e44b5160, #4491ed, #f9f9f9";
color-window: "argb:f2263238, #7c8389, #263238";
}
//@import "dracula"

View file

@ -1,6 +1,5 @@
#!/bin/sh
fd -e pdf | parallel cpdfsqueeze {} {}
fd -e png | parallel oxipng {}
fd -e epub | parallel advzip -z4 {}
fd -e zip | parallel advzip -z4 {}
fd -e jpg | parallel jpegoptim {}
fd -e pdf -x cpdfsqueeze {} {}
fd -e png -x oxipng {}
fd -e epub -e zip -x advzip -z4 {}
fd -e jpg -e jpeg -x jpegoptim {}

11
.setup
View file

@ -6,9 +6,9 @@ sudo eopkg rm celluloid firefox $gnome hexchat libreoffice-common thunderbird tr
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"
gui="bleachbit caja engrampa goverlay keepassx kitty qutebrowser vorta"
media="feh gmic-gimp jpegoptim mpv playerctl usbmuxd rsync viewnior zathura-poppler"
rice="adapta-gtk-theme devilspie2 font-ubuntu-ttf rofi starship stow"
rice="adapta-gtk-theme ant-dracula-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
@ -33,10 +33,11 @@ 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
git g gh:Phantop/solus-stuff ~/.solus
git g gh:Phantop/phantop.github.io ~/.site
git g gh:Phantop/haiku-icons ~/.local/share/icons/haiku-icons
git g gh:Phantop/haiku-icons ~/.local/share/icons/haiku
cd ~/.solus && git update-index --assume-unchanged packager
~/.solus/build
fish -c "invidious;clean;re"
fish -c "invidious;clean"