mirror of
https://github.com/Phantop/dotfiles
synced 2025-03-22 01:49:21 +00:00
qute: change colors and finally whitelist js
This commit is contained in:
parent
45f99173e6
commit
76ecb13a15
|
@ -5,7 +5,7 @@ set -U fish_features 3.0
|
|||
a acmus 'timeout --foreground (math 3600 - (date +%s) % 3600) mpv --loop https://acmusicext.com/static/$argv/sunny/(date +%-I%p|tr APM apm).ogg'
|
||||
a aliases 'v (env which aliases); command aliases'
|
||||
a all2jxl 'fd -e{png,jpg} -x cjxl -e 8 -d 0 {} {.}.jxl && fd -e{png,jpg} -x rm'
|
||||
a ao3 'grep epub $argv | cut -d\" -f4 | parallel aria2c "https://ao3.org{}" -dao3;rm'
|
||||
a ao3 'grep -Eo works/[0-9]+ $argv | uniq | tr -d a-z | parallel aria2c "https://ao3.org/downloads{}/\*.epub" -d ao3; rm'
|
||||
a base64d 'echo (echo $argv | base64 -d 2>/dev/null) | tee /dev/stderr 2>| clip;:'
|
||||
a bax 'source (which bax) && bax'
|
||||
a catbox 'curl https://catbox.moe/user/api.php -F reqtype=fileupload -F fileToUpload=@$argv;:'
|
||||
|
@ -26,6 +26,7 @@ a launcher 'rofi -combi-modi "drun,run" -show combi -modi "combi,window"'
|
|||
a less 'eval $PAGER'
|
||||
a listen 'pactl list | grep loop && set t un; pactl "$t"load-module module-loopback'
|
||||
a musikcube 'screen -R -s musikcube'
|
||||
a ncdu 'ncdu --color off'
|
||||
a nix 'bax . ~/.nix-profile/etc/profile.d/nix.sh; command nix'
|
||||
a off shutdown
|
||||
a offh 'off (math "60*"$argv);:'
|
||||
|
@ -43,6 +44,7 @@ a spleet 'spleeter separate -o . -c flac'
|
|||
a tar bsdtar
|
||||
a tcsv 'curl -sL http://torrents-csv.ml/service/search?q="$argv"|jq ".[]|.name,.infohash,.seeders";:'
|
||||
a temp 'curl temp.sh -T'
|
||||
a tldrl 'curl -s https://raw.githubusercontent.com/tldr-pages/tldr/master/pages/{common,linux}/$argv.md;:'
|
||||
a transfer 'curl https://transfer.sh/(basename $argv) -T'
|
||||
a twitch-dl 'ffmpeg -i (yt-dlp -e $argv[1]|tr / _) -c copy $argv[2..-1] "file:(yt-dlp -g $argv[1]).mkv"'
|
||||
a up 'se up --y'
|
||||
|
@ -66,6 +68,6 @@ for i in (cat ~/.config/qutebrowser/quickmarks | cut -d ' ' -f1)
|
|||
a $i "qb \":open -t $i\""
|
||||
end
|
||||
|
||||
for i in getnative mcross nsz scdl spleeter thonny
|
||||
for i in deemix nsz scdl soundscrape spleeter
|
||||
a $i "pipx run $i"
|
||||
end
|
||||
|
|
|
@ -12,3 +12,5 @@ fd -t f -x advdef -z2
|
|||
|
||||
fd -e mp3 -x mp3packer
|
||||
fd -e mp3 -x rename -- -vbr ''
|
||||
|
||||
fd -e so -x strip
|
||||
|
|
39
bin/setup
39
bin/setup
|
@ -1,38 +1,34 @@
|
|||
#!/bin/bash
|
||||
alias s=sudo se="sudo eopkg -y" g=git
|
||||
alias s=sudo se="s eopkg -y" g=git
|
||||
|
||||
gnome="$(echo eog file-roller gnome-{photos,mpv,terminal} nautilus rhythmbox)"
|
||||
audio="audacious audacious-plugins audacity opus-tools spek"
|
||||
dev="ccache docker-compose git-extras llvm-clang neovim parallel qt-creator solbuild tig upx"
|
||||
gui="abiword caja gmic-gimp engrampa keepassxc kitty lutris"
|
||||
media="avidemux gaupol jpegoptim mkvtoolnix mpv playerctl usbmuxd viewnior yt-dlp zathura-poppler"
|
||||
rice="ant-dracula-gtk-theme font-ubuntu-ttf rofi starship stow"
|
||||
term="advancecomp autojump fd fish fzf innoextract micro most ncdu nnn p7zip ripgrep tmux"
|
||||
sys="bleachbit corectrl ifuse linux-tools-cpupower python-wheel rsync screen tlp"
|
||||
web="arcanist aria2 nicotine-plus qutebrowser openssh-server rclone subliminal syncthing-gtk"
|
||||
|
||||
se up
|
||||
se it -c system.devel $audio $dev $gui $media $rice $sys $term $web
|
||||
se rm $gnome firefox hexchat libreoffice-common onboard thunderbird
|
||||
|
||||
echo source ~/.config/bashrc > ~/.bashrc
|
||||
ln -s ~/.config/gtk-3.0/gtkrc ~/.gtkrc-2.0
|
||||
install -D <(echo set -g mouse on) ~/.config/tmux/tmux.conf
|
||||
audio="audacious audacious-plugins audacity opus-tools spek"
|
||||
dev="ccache docker-compose git-extras llvm-clang neovim parallel qt-creator solbuild"
|
||||
gui="abiword caja gmic-gimp engrampa keepassxc kitty lutris zathura-poppler"
|
||||
media="avidemux gaupol jpegoptim mkvtoolnix mpv playerctl usbmuxd viewnior yt-dlp"
|
||||
rice="ant-dracula-gtk-theme font-ubuntu-ttf rofi starship stow"
|
||||
term="advancecomp autojump fd fish fzf innoextract micro most ncdu p7zip ripgrep tig"
|
||||
sys="bleachbit corectrl ifuse linux-tools-cpupower python-wheel rsync screen tlp upx"
|
||||
web="arcanist aria2 nicotine-plus qutebrowser openssh-server subliminal syncthing-gtk"
|
||||
se up; se it -c system.devel $audio $dev $gui $media $rice $sys $term $web
|
||||
|
||||
mkdir -p ~/.parallel/will-cite
|
||||
stow --no-folding -d ~/.dotfiles -t ~/.config .
|
||||
stow --no-folding -d ~/.dotfiles -t ~/.local/bin bin
|
||||
|
||||
mkdir -p ~/.parallel/will-cite
|
||||
echo source ~/.config/bashrc > ~/.bashrc
|
||||
ln -s ~/.config/gtk-3.0/gtkrc ~/.gtkrc-2.0
|
||||
|
||||
un(){ F=$(mktemp); mkdir -p $2; curl https://api.github.com/repos/$1/releases |\
|
||||
grep -om1 http.\*zip | wget -i- -O$F; unzip $F -d $2;}
|
||||
un bloc97/Anime4k ~/.config/mpv/shaders
|
||||
un mozilla/pdf.js ~/.local/share/qutebrowser/pdfjs
|
||||
wget https://adsbypasser.github.io/releases/adsbypasser.full.es7.user.js -P ~/.config/qutebrowser/greasemonkey/
|
||||
pip3 install adblock pipx-in-pipx readability-lxml
|
||||
|
||||
pip3 install adblock pipx-in-pipx readability-lxml sh
|
||||
parallel pipx install ::: deemix soundscrape tldr
|
||||
|
||||
chsh -s "$(which fish)"
|
||||
fish -c "aliases;clean"
|
||||
s usermod -aG docker $USER
|
||||
s systemctl enable --now docker
|
||||
s systemctl mask tracker-{store,miner-{fs,rss,apps},extra,writeback}
|
||||
|
@ -44,9 +40,6 @@ g g p:haiku-icons ~/.local/share/icons/Haiku
|
|||
g g h:junegunn/vim-plug ~/.config/nvim/autoload
|
||||
nvim +PlugUpdate +q +q
|
||||
|
||||
chsh -s $(which fish)
|
||||
fish -c "aliases;clean"
|
||||
|
||||
gsettings set org.gnome.desktop.interface cursor-theme Haiku
|
||||
gsettings set org.gnome.desktop.interface icon-theme Haiku
|
||||
gsettings set org.gnome.desktop.interface gtk-theme Ant-Dracula
|
||||
|
|
|
@ -22,7 +22,6 @@ if tty -s
|
|||
set fish_color_valid_path --underline
|
||||
set fish_pager_color_prefix 'white' '--bold' '--underline'
|
||||
|
||||
bind \eo 'nnn'
|
||||
bind \ed 'ncdu'
|
||||
bind \ef 'fzf | clip'
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ bind = {
|
|||
'<Ctrl-w>': 'tab-close',
|
||||
'<Alt+f>' : 'config-cycle hints.chars qwerasdf asdfghjkl',
|
||||
',': 'hint links run mpv {hint-url}',
|
||||
'e': 'config-cycle -p -u *://*.{url:host}/* content.javascript.enabled ;; reload',
|
||||
'm': 'mpv {url}',
|
||||
's1': 'download-open',
|
||||
'sa': 'open -t archive.is/?run=1&url={url}',
|
||||
|
@ -13,7 +14,8 @@ bind = {
|
|||
'sq': 'spawn -u qr',
|
||||
'sr': 'remove-sticky',
|
||||
'st': 'config-cycle content.proxy socks://localhost:9050/ system',
|
||||
'T' : 'tab-next'
|
||||
'T' : 'tab-next',
|
||||
'td': 'config-unset -u {url:host} content.headers.user_agent',
|
||||
}
|
||||
for a, b in bind.items():
|
||||
config.bind(a, b)
|
|
@ -2,9 +2,15 @@ cc = c.colors
|
|||
ccc = cc.completion
|
||||
cct = cc.tabs
|
||||
|
||||
guicol = '#222D32'
|
||||
accent = '#5294E2'
|
||||
#dracula
|
||||
guinum = 0x282a36
|
||||
accent = '#bd93f9'
|
||||
|
||||
#adapta
|
||||
#guinum = 0x222d32
|
||||
#accent = '#5294e2'
|
||||
|
||||
guicol = '#' + hex(guinum).lstrip("0x")
|
||||
cc.downloads.bar.bg = guicol
|
||||
cc.prompts.bg = guicol
|
||||
cc.statusbar.command.bg = guicol
|
||||
|
@ -18,6 +24,8 @@ cct.even.bg = guicol
|
|||
cct.odd.bg = guicol
|
||||
cct.pinned.even.bg = guicol
|
||||
cct.pinned.odd.bg = guicol
|
||||
ccc.even.bg = '#' + hex(guinum + 0x050505).lstrip("0x")
|
||||
ccc.odd.bg = '#' + hex(guinum - 0x050505).lstrip("0x")
|
||||
|
||||
ccc.item.selected.bg = accent
|
||||
ccc.item.selected.border.bottom = accent
|
||||
|
@ -28,16 +36,12 @@ cct.pinned.selected.even.bg = accent
|
|||
cct.pinned.selected.odd.bg = accent
|
||||
cct.selected.even.bg = accent
|
||||
cct.selected.odd.bg = accent
|
||||
c.hints.border = accent
|
||||
cc.hints.bg = accent
|
||||
|
||||
cc.messages.warning.fg = 'white'
|
||||
cct.pinned.selected.even.fg = 'black'
|
||||
cct.pinned.selected.odd.fg = 'black'
|
||||
cct.selected.even.fg = 'black'
|
||||
cct.selected.odd.fg = 'black'
|
||||
|
||||
cc.messages.warning.bg = 'red'
|
||||
cc.messages.warning.border = 'red'
|
||||
ccc.even.bg = '#29353B'
|
||||
ccc.odd.bg = '#243035'
|
||||
c.hints.border = '1px solid #00A5BA'
|
||||
cc.hints.bg = 'rgba(0, 226, 255, 0.8)'
|
|
@ -1,8 +1,9 @@
|
|||
config.load_autoconfig(False)
|
||||
config.source('config/adapta.py')
|
||||
config.source('config/adblock.py')
|
||||
config.source('config/bindings.py')
|
||||
config.source('config/redirects.py')
|
||||
config.source('color.py')
|
||||
config.source('adblock.py')
|
||||
config.source('bindings.py')
|
||||
config.source('javascript.py')
|
||||
config.source('redirects.py')
|
||||
|
||||
c.url.default_page = 'feedly.com/i/my'
|
||||
c.url.start_pages = 'covid19.rpi.edu/dailycheckin'
|
||||
|
@ -15,6 +16,7 @@ c.colors.webpage.darkmode.enabled = True
|
|||
c.tabs.show = 'multiple'
|
||||
c.confirm_quit = ['downloads']
|
||||
c.qt.force_platformtheme = 'gtk2'
|
||||
c.content.user_stylesheets = 'user.css'
|
||||
c.content.cookies.accept = 'no-3rdparty'
|
||||
c.colors.webpage.preferred_color_scheme = 'dark'
|
||||
c.colors.webpage.darkmode.policy.images = 'never'
|
||||
|
@ -22,7 +24,7 @@ c.colors.webpage.darkmode.policy.images = 'never'
|
|||
c.aliases['re'] = 'restart'
|
||||
c.aliases['mpv'] = 'spawn -mdv mpv --ytdl-raw-options=sub-lang=en'
|
||||
c.aliases['remove-sticky'] = 'jseval -q document.querySelectorAll("*").forEach(e=>{["sticky","fixed"].includes(getComputedStyle(e).position)&&e.parentNode.removeChild(e)})'
|
||||
c.aliases['toggle-dark'] = 'reload;; jseval -qf ~/.config/qutebrowser/greasemonkey/white.js;; stop'
|
||||
c.aliases['toggle-dark'] = 'reload;;jseval -q const meta=document.createElement("meta");meta.name="color-scheme";document.head.appendChild(meta).content="dark";;stop'
|
||||
|
||||
config.set('content.notifications.enabled', True, 'https://mail.tutanota.com')
|
||||
config.set('content.register_protocol_handler', True, 'https://mail.tutanota.com')
|
||||
|
@ -31,6 +33,3 @@ import socket
|
|||
if socket.gethostname() == 'wheatley':
|
||||
c.zoom.default = 125
|
||||
c.qt.force_software_rendering = 'chromium'
|
||||
|
||||
#import dracula.draw
|
||||
#dracula.draw.blood(c, {'spacing': {'vertical': 1,'horizontal': 0}})
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
// ==UserScript==
|
||||
// @name AO3 Lazier
|
||||
// @include https://archiveofourown.org/*
|
||||
// @version 3.0
|
||||
// ==/UserScript==
|
||||
document.querySelectorAll('li.blurb').forEach(b=>{
|
||||
i=b.querySelector('.heading a').href.match(/[0-9]+/)
|
||||
b.innerHTML += `<div class="actions">
|
||||
<a style="position:absolute;right:7em;top:.5em"
|
||||
href='/downloads/${i}/*.epub'>Download</a></div>`})
|
||||
|
||||
b=document.createElement('a')
|
||||
c=document.getElementsByTagName('option')
|
||||
i=document.getElementsByClassName('chapter')[2]
|
||||
b.href = c[c.length-1].value
|
||||
i.parentElement.insertBefore(b, i).innerText = 'Latest Chapter →'
|
|
@ -1,23 +0,0 @@
|
|||
// ==UserScript==
|
||||
// @name DisClear
|
||||
// @homepage https://github.com/birb-naise/discord-simple-clear
|
||||
// @include https://*.discord.com/*
|
||||
// ==/UserScript==
|
||||
document.head.appendChild(document.createElement('style')).innerHTML=`
|
||||
.theme-dark, .theme-light {
|
||||
--background-primary: transparent;
|
||||
--background-secondary: transparent;
|
||||
--background-secondary-alt: transparent;
|
||||
--background-tertiary: transparent;
|
||||
--background-floating: rgba(0, 0, 0, .6);
|
||||
--channeltextarea-background: transparent;
|
||||
--font-primary: "Ubuntu Mono";
|
||||
}
|
||||
|
||||
.container-2cd8Mz, .searchBar-3TnChZ, .listItemWrapper-3d87LP,
|
||||
[aria-label="Help"], [aria-label="Inbox"], [aria-label="Send a gift"],
|
||||
[href="/store"], [href="/channels/@me"] {display: none}
|
||||
|
||||
body {background: url(
|
||||
"https://cdn.discordapp.com/attachments/773556458234052608/929383713932992512/0dKbZO5-16-9.webp"
|
||||
)}`
|
|
@ -1,17 +0,0 @@
|
|||
// ==UserScript==
|
||||
// @name Hacker Blues
|
||||
// @include https://news.ycombinator.com/*
|
||||
// ==/UserScript==
|
||||
document.head.appendChild(document.createElement('style')).innerHTML=`
|
||||
body {
|
||||
background: #2b3033 !important;
|
||||
color: #f0ffff !important;
|
||||
}
|
||||
body > center > table[width="85%"] {
|
||||
background: #212121 !important;
|
||||
box-shadow: 0px 0px 30px 3px rgba(0, 0, 0, 0.2) !important;
|
||||
}
|
||||
td[bgcolor="#ff6600"] {
|
||||
background: linear-gradient(to top, #45515b 0%, #4b5762 100%) !important;
|
||||
}`
|
||||
document.body.style.zoom=1.15;
|
|
@ -1,6 +0,0 @@
|
|||
// ==UserScript==
|
||||
// @name BetterTTV
|
||||
// @include https://www.twitch.tv/*
|
||||
// ==/UserScript==
|
||||
document.head.appendChild(document.createElement("script")).src=
|
||||
"https://cdn.betterttv.net/betterttv.js"
|
|
@ -1,11 +0,0 @@
|
|||
// ==UserScript==
|
||||
// @name WhiteList
|
||||
// @match https://archiveofourown.org/*
|
||||
// @match https://canary.discord.com/*
|
||||
// @match https://mail.tutanota.com/*
|
||||
// @match https://teddit.net/*
|
||||
// ==/UserScript==
|
||||
const meta = document.createElement('meta');
|
||||
meta.name = "color-scheme";
|
||||
meta.content = "dark light";
|
||||
document.head.appendChild(meta);
|
15
qutebrowser/javascript.py
Normal file
15
qutebrowser/javascript.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
c.content.javascript.enabled = False
|
||||
sites = [
|
||||
'canary.discord.com',
|
||||
'drive.google.com',
|
||||
'duckduckgo.com',
|
||||
'feedly.com',
|
||||
'mail.tutanota.com',
|
||||
|
||||
'*.rpi.edu',
|
||||
'api-3e0243bb.duosecurity.com',
|
||||
]
|
||||
for site in sites:
|
||||
config.set('content.javascript.enabled', True, 'https://' + site)
|
||||
|
||||
config.set('content.headers.user_agent', 'iPhone', 'docs.google.com')
|
|
@ -24,7 +24,9 @@ MAP = {
|
|||
"www.instagram.com": o(s, 'bibliogram.art'),
|
||||
"www.amazon.com": o(s, 'smile.amazon.com'),
|
||||
"imgur.com" : o(s, 'imgin.voidnet.tech'),
|
||||
"medium.com" : o(s, 'scribe.rip')
|
||||
"medium.com" : o(s, 'scribe.rip'),
|
||||
"www.twitch.tv" : o(s, 'm.twitch.tv'),
|
||||
"discord.com" : o(s, 'canary.discord.com')
|
||||
}
|
||||
def f(info: i.Request):
|
||||
if (info.resource_type != i.ResourceType.main_frame or
|
23
qutebrowser/user.css
Normal file
23
qutebrowser/user.css
Normal file
|
@ -0,0 +1,23 @@
|
|||
#hnmain { background: #212121; zoom: 120%; }
|
||||
#hnmain td[bgcolor="#ff6600"] { background: #4b5762; }
|
||||
|
||||
#app-mount {
|
||||
--background-primary: transparent;
|
||||
--background-secondary: transparent;
|
||||
--background-secondary-alt: transparent;
|
||||
--background-tertiary: transparent;
|
||||
--background-floating: rgba(0, 0, 0, .6);
|
||||
--channeltextarea-background: transparent;
|
||||
font-family: "Ubuntu Mono";
|
||||
background: url(
|
||||
"https://cdn.discordapp.com/attachments/773556458234052608/929383713932992512/0dKbZO5-16-9.webp"
|
||||
);}
|
||||
|
||||
#app-mount [aria-label="Channels"] div [class^="unread"] { background-color: #cfcdcf; }
|
||||
#app-mount [class^="container"] { background-color: transparent; }
|
||||
|
||||
#app-mount [aria-label$="sidebar"], #app-mount [aria-label="Inbox"],
|
||||
#app-mount [class^="privateChannels"] [class^="searchBar"], #app-mount [href="/store"],
|
||||
#app-mount [aria-label$="gift"], #app-mount [aria-label="Help"] { display: none }
|
||||
|
||||
.app-container .doc-container .doc div { max-width: 666pt !important; margin: auto; }
|
Loading…
Reference in a new issue