diff --git a/bin/aliases b/bin/aliases index 2cf99b9..4e6c39e 100755 --- a/bin/aliases +++ b/bin/aliases @@ -1,6 +1,6 @@ #!/usr/bin/fish rm -r ~/.config/fish/* -ln -s ~/.dotfiles/fish/config.fish ~/.config/fish +ln -s ../../.dotfiles/fish/config.fish ~/.config/fish curl -sL https://git.io/fisher | source fisher install {jorgebucaran/replay,PatrickF1/fzf}.fish @@ -70,7 +70,7 @@ a squash 'mksquashfs . $PWD.squashfs -comp zstd -b 1M -Xcompression-level 22' a undwarfs 'mkdir dwarfs-root; dwarfsextract -o dwarfs-root -i' for i in (cat ~/.config/qutebrowser/quickmarks | cut -d ' ' -f1) - a $i "qb \":open -t $i\"" + a $i "qutebrowser-profile --load $i \":open $i\"" end for i in deemix nsz scdl soundscrape spleeter diff --git a/bin/setup b/bin/setup index 1b6a329..73d1a70 100755 --- a/bin/setup +++ b/bin/setup @@ -7,9 +7,9 @@ se rm $gnome firefox hexchat libreoffice-common onboard thunderbird dev="arcanist ccache git-extras llvm-clang neovim parallel qt-creator solbuild" gui="caja gimp keepassxc kitty nicotine-plus qutebrowser syncthing zathura-mupdf" med="audaci{ty,ous{,-plugins}} avidemux mkvtoolnix mpv opus-tools spek yt-dlp" -ric="ant-dracula-gtk-theme autojump font-ubuntu-ttf rofi starship stow" +ric="ant-dracula-gtk-theme autojump font-ubuntu-ttf rofi starship sassc stow" tui="advancecomp aria2 fd fish fzf innoextract jpegoptim ncdu ripgrep tig" -sys="bleachbit corectrl ifuse linux-tools-cpupower p7zip privoxy tlp usbmuxd upx" +sys="bleachbit corectrl ifuse linux-tools-cpupower p7zip privoxy tlp usbmuxd upx tor" se up; se it -c system.devel $dev $gui $med $ric $sys $tui stow --no-folding -d ~/.dotfiles -t ~/.config . @@ -28,6 +28,7 @@ chsh -s "$(which fish)" fish -c "aliases;clean" s usermod -aG docker "$USER" s systemctl mask tracker-{store,miner-{fs,rss,apps},extra,writeback} +s systemctl enable --now privoxy g g p:appdwarf ~/.appdwarf g g p:solus-stuff ~/.solus diff --git a/qutebrowser/aliases.py b/qutebrowser/aliases.py deleted file mode 100644 index 260420e..0000000 --- a/qutebrowser/aliases.py +++ /dev/null @@ -1,11 +0,0 @@ -a=c.aliases -a['re'] = 'restart' -a['css-reload'] = 'set content.user_stylesheets user.css' -a['scss-reload'] = 'spawn -u /bin/bash -c "sassc $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)})' -a['toggle-dark'] = 'reload;;jseval -q const meta=document.createElement("meta");meta.name="color-scheme";document.head.appendChild(meta).content="dark";;stop' -a['shutup'] = 'jseval -q document.head.appendChild(document.createElement("style")).innerHTML="@import url(https://rickyromero.com/shutup/updates/shutup.css)"' -a['monolith-save'] = 'spawn kitty fish -c "monolith {url} -o' - -a['ao3-first'] = 'jseval -q window.location.href=document.getElementsByTagName(\'option\')[0].value' -a['ao3-latest'] = 'jseval -q c=document.getElementsByTagName(\'option\'); window.location.href = c[c.length-1].value' diff --git a/qutebrowser/bindings.py b/qutebrowser/bindings.py index 610fc6d..aaae094 100644 --- a/qutebrowser/bindings.py +++ b/qutebrowser/bindings.py @@ -1,3 +1,16 @@ +a=c.aliases +a['re'] = 'restart' +a['profile'] = 'spawn qutebrowser-profile' +a['css-reload'] = 'set content.user_stylesheets user.css' +a['scss-reload'] = 'spawn -u /bin/bash -c "sassc $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)})' +a['toggle-dark'] = 'reload;;jseval -q const meta=document.createElement("meta");meta.name="color-scheme";document.head.appendChild(meta).content="dark";;stop' +a['shutup'] = 'jseval -q document.head.appendChild(document.createElement("style")).innerHTML="@import url(https://rickyromero.com/shutup/updates/shutup.css)"' +a['monolith-save'] = 'spawn kitty fish -c "monolith {url} -o' + +a['ao3-first'] = 'jseval -q window.location.href=document.getElementsByTagName(\'option\')[0].value' +a['ao3-latest'] = 'jseval -q c=document.getElementsByTagName(\'option\'); window.location.href = c[c.length-1].value' + kitdl = 'spawn kitty fish -c "dl &&' bind = { '': 'close', @@ -22,9 +35,10 @@ bind = { 'sm': 'monolith-save ~/Downloads/dump.html"', 'sq': 'spawn -u qr', 'sr': 'remove-sticky', - 'st': 'config-cycle -p content.proxy socks://localhost:9050 http://localhost:8118', + 'st': 'config-cycle -p content.proxy socks://localhost:9050 ' + c.content.proxy, 'T' : 'tab-next', 'td': 'config-unset -u {url:host} content.headers.user_agent', + 'W': 'config-cycle -p -u *://*.{url:host}/* content.cookies.accept no-3rdparty never', } for a, b in bind.items(): config.bind(a, b) diff --git a/qutebrowser/config.py b/qutebrowser/config.py index a994359..e9b3c26 100644 --- a/qutebrowser/config.py +++ b/qutebrowser/config.py @@ -1,30 +1,25 @@ config.load_autoconfig(False) -config.source('adblock.py') -config.source('aliases.py') -config.source('color.py') -config.source('bindings.py') -config.source('javascript.py') -config.source('redirects.py') - -c.url.start_pages = c.url.default_page = 'megafocs.herokuapp.com' -config.set('content.javascript.enabled', True, c.url.start_pages) -c.url.searchengines['DEFAULT'] = 'farside.link/searxng/search?q={}' -c.url.searchengines['y'] = 'farside.link/invidious/search?q={}' -c.url.searchengines['t'] = 'ao3.org/tags/{}' -c.url.searchengines['!'] = 'duckduckgo.com/?q=!{}' - -c.tabs.show = 'multiple' -c.confirm_quit = ['downloads'] -c.qt.force_platformtheme = 'gtk2' -c.content.fullscreen.window = True -c.content.user_stylesheets = 'user.css' -c.content.cookies.accept = 'no-3rdparty' -c.colors.webpage.darkmode.enabled = True -c.content.proxy = 'http://localhost:8118' -c.colors.webpage.preferred_color_scheme = 'dark' -c.colors.webpage.darkmode.policy.images = 'never' -c.completion.open_categories = ["bookmarks","history"] import socket if socket.gethostname() == 'wheatley': c.zoom.default = 125 + +c.content.fullscreen.window = True +c.content.proxy = 'http://localhost:8118' +c.content.user_stylesheets = 'user.css' + +c.confirm_quit = ['downloads'] +c.downloads.location.directory = '~/Downloads' +c.qt.workarounds.remove_service_workers = True + +c.url.searchengines['DEFAULT'] = 'farside.link/searxng/search?q={}' +c.url.searchengines['y'] = 'farside.link/invidious/search?q={}' +c.url.searchengines['t'] = 'ao3.org/tags/{}' +c.url.searchengines['!'] = 'duckduckgo.com/?q=!{}' +c.url.start_pages = c.url.default_page = 'megafocs.herokuapp.com' + +config.source('adblock.py') +config.source('bindings.py') +config.source('redirects.py') +config.source('sites.py') +config.source('theme.py') diff --git a/qutebrowser/quickmarks b/qutebrowser/quickmarks index d7ce12f..4a867f4 100644 --- a/qutebrowser/quickmarks +++ b/qutebrowser/quickmarks @@ -1,4 +1,3 @@ discord canary.discord.com/app -hn news.ycombinator.com lms lms.rpi.edu/ultra/stream tuta mail.tutanota.com diff --git a/qutebrowser/redirects.py b/qutebrowser/redirects.py index 4dd414e..d606aad 100644 --- a/qutebrowser/redirects.py +++ b/qutebrowser/redirects.py @@ -52,7 +52,7 @@ MAP = { "www.amazon.com": o(s, 'smile.amazon.com'), "discord.com" : o(s, 'canary.discord.com'), "vm.tiktok.com" : o(s, 'proxitok.herokuapp.com'), - "tumblr.com" : o(s, 'tumblr-splash.herokuapp.com'), + "tumblr.com" : o(s, 'splashblr.herokuapp.com'), } def f(info: i.Request): if (info.resource_type != i.ResourceType.main_frame or diff --git a/qutebrowser/javascript.py b/qutebrowser/sites.py similarity index 57% rename from qutebrowser/javascript.py rename to qutebrowser/sites.py index 8290061..0f7cf24 100644 --- a/qutebrowser/javascript.py +++ b/qutebrowser/sites.py @@ -1,15 +1,20 @@ +c.content.cookies.accept = "never" c.content.javascript.enabled = False +c.content.notifications.enabled = False +c.content.register_protocol_handler = False sites = [ + c.url.default_page, + + 'archiveofourown.org', 'canary.discord.com', - 'mail.tutanota.com', + '*.tutanota.com', + '*.rpi.edu', 'api-3e0243bb.duosecurity.com', ] for site in sites: config.set('content.javascript.enabled', True, 'https://' + site) + config.set('content.cookies.accept', 'no-3rdparty', 'https://' + site) config.set('content.headers.user_agent', 'iPhone', 'docs.google.com') config.set('content.headers.user_agent', 'iPhone', 'drive.google.com') - -config.set('content.notifications.enabled', True, 'https://mail.tutanota.com') -config.set('content.register_protocol_handler', True, 'https://mail.tutanota.com') diff --git a/qutebrowser/color.py b/qutebrowser/theme.py similarity index 86% rename from qutebrowser/color.py rename to qutebrowser/theme.py index 36b0f97..00c615a 100644 --- a/qutebrowser/color.py +++ b/qutebrowser/theme.py @@ -45,3 +45,11 @@ cct.selected.even.fg = 'black' cct.selected.odd.fg = 'black' cc.messages.warning.bg = 'red' cc.messages.warning.border = 'red' + +cc.webpage.darkmode.enabled = True +cc.webpage.preferred_color_scheme = 'dark' +cc.webpage.darkmode.policy.images = 'never' + +c.tabs.show = 'multiple' +c.qt.force_platformtheme = 'gtk2' +c.completion.open_categories = ["bookmarks","history"] diff --git a/qutebrowser/user.scss b/qutebrowser/user.scss index 0863c62..a1a8fba 100644 --- a/qutebrowser/user.scss +++ b/qutebrowser/user.scss @@ -39,6 +39,7 @@ ul.work > li.download { > ul { border: none !important; position: static !important; + display: inline; > li {font-size: small; &:not(:nth-child(2)) {display: none !important}} } }