From 9bc1e3ddf7ba687f9d376b7a581c4c0647dbaf90 Mon Sep 17 00:00:00 2001 From: Phantop Date: Thu, 25 May 2023 12:14:34 -0400 Subject: [PATCH] qute: more redirects, scss comments, fish: !abbr, nvim: plugins --- bin/aliases | 3 ++- fish/config.fish | 2 ++ nvim/init.lua | 8 +++++++- qutebrowser/redirects.py | 13 ++++++++++--- qutebrowser/user.scss | 21 ++++++++++++--------- 5 files changed, 33 insertions(+), 14 deletions(-) diff --git a/bin/aliases b/bin/aliases index 84c6285..dbf71c8 100755 --- a/bin/aliases +++ b/bin/aliases @@ -39,7 +39,6 @@ a nix '. ~/.nix-profile/etc/profile.d/nix.fish; command nix' a nsp 'netsurf (pandoc $argv -s -t html | psub -s .html);:' a nsmd 'netsurf (md2html $argv | psub -s .html);:' a off shutdown -a open xdg-open a png2webp 'fd -e png -x cwebp -z 9 -mt {} -o {.}.webp \; -x rm' a qutainer 'qutebrowser --temp-basedir' a rmdirs 'ff -t d -x rmdir -p' @@ -73,6 +72,8 @@ a squash 'mksquashfs . $PWD.squashfs -comp zstd -b 1M -Xcompression-level 22' a undwarfs 'mkdir dwarfs-root; dwarfsextract -o dwarfs-root -i' a xcompress 'fxz -T0 -9 -k' +a history_match 'history -p (string sub -s 2 $argv[1]) | head -n1;:' + for i in (cat ~/.config/qutebrowser/quickmarks | cut -d ' ' -f1) a $i "qutebrowser / \":open $i\"" end diff --git a/fish/config.fish b/fish/config.fish index 47bfdff..2bcb923 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -22,4 +22,6 @@ bind \ed 'ncdu' bind \ef '_fzf_wrapper | clip' bind \e\co 'open (_fzf_wrapper)' +abbr -a !. -r '^!.*' -f history_match + printf "\e[5 q" diff --git a/nvim/init.lua b/nvim/init.lua index f39d6e1..b1aeea1 100755 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -11,11 +11,17 @@ require "paq" { 'tpope/vim-commentary'; 'tpope/vim-sensible'; 'tpope/vim-sleuth'; - 'valloric/youcompleteme'; 'vim-airline/vim-airline'; + + 'https://git.sr.ht/~ackyshake/VimCompletesMe.vim'; + { 'nvim-treesitter/nvim-treesitter', run = function() vim.cmd 'TSUpdate' end }; + } require("nnn").setup() require("gitsigns").setup() +require'nvim-treesitter.configs'.setup { + highlight = { enable = true, additional_vim_regex_highlighting = false } +} vim.opt.background = "dark" vim.opt.clipboard = "unnamedplus" diff --git a/qutebrowser/redirects.py b/qutebrowser/redirects.py index 58be17d..17615cd 100644 --- a/qutebrowser/redirects.py +++ b/qutebrowser/redirects.py @@ -31,6 +31,12 @@ def proxitok(url: QUrl) -> bool: return farside(url, '/proxitok/') def querte (url: QUrl) -> bool: return farside(url, '/querte/') +def breezewiki (url: QUrl) -> bool: + return farside(url, '/breezewiki/') +def dumb (url: QUrl) -> bool: + return farside(url, '/dumb/') +def anonymousoverflow (url: QUrl) -> bool: + return farside(url, '/anonymousoverflow/') map = { "reddit.com": reddit, @@ -51,15 +57,16 @@ map = { "vm.tiktok.com" : proxitok, "www.tiktok.com" : proxitok, "www.quora.com": querte, + "fandom.com": breezewiki, + "www.fandom.com": breezewiki, + "genius.com" : dumb, + "stackoverflow.com" : anonymousoverflow, "www.twitch.tv" : o(s, 'm.twitch.tv'), "discord.com" : o(s, 'canary.discord.com'), "tumblr.com" : o(s, 'splashblr.fly.dev'), "www.npr.org" : o(s, 'text.npr.org'), - "www.goodreads.com" : o(s, 'bl.vern.cc'), - "genius.com" : o(s, 'db.vern.cc'), - "stackoverflow.com" : o(s, 'ao.vern.cc'), } def f(info: i.Request): if (info.resource_type != i.ResourceType.main_frame or diff --git a/qutebrowser/user.scss b/qutebrowser/user.scss index f906b01..ed49960 100644 --- a/qutebrowser/user.scss +++ b/qutebrowser/user.scss @@ -1,4 +1,4 @@ -#hnmain { +#hnmain { // hacker news zoom: 120%; background: #212121 !important; td[bgcolor="#ff6600"] {background: #4b5762 !important} @@ -6,7 +6,7 @@ [action="comment"] {display:none} } -#app-mount { +#app-mount { //discord $back: primary, secondary, secondary-alt, tertiary; @each $i in $back {--background-#{$i}: transparent} @@ -24,9 +24,11 @@ "https://cdn.discordapp.com/attachments/773556458234052608/929383713932992512/0dKbZO5-16-9.webp" )} -div.doc-container div.doc div {max-width: 666pt !important; margin: auto} -.bridge-card { form, h5 {display:revert} .showmore {display:none} } +div.doc-container div.doc div {max-width: 666pt !important; margin: auto} // better docs mobiles +.bridge-card { form, h5 {display:revert} .showmore {display:none} } // show rss-bridges +#years-table { .detail-view-container { display: flex } td { background-image: unset } } //quatalog detailed view +/* hide ads and invidious recommends */ $class: ad-frame-container, ad-panel, ad-slot, adsbygoogle, adbox, adunit, adunit-wrapper, b_ad, leaderboard, "pure-u-lg-1-5:nth-child(3)"; @each $i in $class {.#{$i} {display:none}} @@ -37,8 +39,9 @@ $div: 'class*=-ad-container', 'class*=ad-wrapper', 'id*=_ad_native', $id: ads, leaderboard, player-ads, rc-row-container; @each $i in $id {##{$i} {display:none}} +/* --------------------------------- */ -body>nav:nth-child(1):not([class]) {position: absolute} +body>nav:nth-child(1):not([class]) {position: absolute} // nitter/libreddit/librex body { --bg_panel: #232531; --bg_overlays: var(--bg_panel); @@ -52,10 +55,10 @@ body { --shadow: 0 1px 3px #00000055; } -[id^="streamEntryBody"] {display: none} +[id^="streamEntryBody"] {display: none} // lms show grades .stream-grade.ng-hide { display: flex !important } -body>div#outer.wrapper { +body>div#outer.wrapper { //ao3 background: #000; color: #fff; #inner .actions, fieldset { @@ -111,7 +114,7 @@ body>div#outer.wrapper { } } -[data-csrf-token] { +@media (prefers-color-scheme: dark) { [data-csrf-token] { // miniflux background: #000; color: #EEE; --entry-content-color: #EEE; @@ -127,4 +130,4 @@ body>div#outer.wrapper { a:link {color: rgb(221, 221, 221);} .item-status-read .item-title > a:link {color: rgb(155, 148, 148);} .logo a span, .logo a:hover { color: #c88aff; } -} +} }