| remove qutebrower. - dotfiles - These are my dotfiles. There are many like it, … | |
| git clone git://jay.scot/dotfiles | |
| Log | |
| Files | |
| Refs | |
| README | |
| --- | |
| commit f1ecc6cd5d87ce0369fe692213b63744516cc59b | |
| parent 3531ea824509e3e833008e785a337228714692c5 | |
| Author: Jay Scott <[email protected]> | |
| Date: Tue, 25 Nov 2025 18:17:34 +0000 | |
| remove qutebrower. | |
| Diffstat: | |
| M .gitignore | 10 +++++----- | |
| M README | 12 ++++++------ | |
| M ashrc | 4 ++-- | |
| A bin/fdm_parse_feeds.sh | 24 ++++++++++++++++++++++++ | |
| D bin/link-handler | 40 -----------------------------… | |
| A bin/link-handler.sh | 39 +++++++++++++++++++++++++++++… | |
| R bin/music -> bin/music.sh | 0 | |
| A bin/offline.sh | 10 ++++++++++ | |
| R bin/switch_audio -> bin/old/switch… | 0 | |
| A bin/update_feeds.sh | 20 ++++++++++++++++++++ | |
| R bin/yt-feedurl -> bin/yt-feedurl.sh | 0 | |
| D bin/ytd | 77 -----------------------------… | |
| A bin/ytd.sh | 78 +++++++++++++++++++++++++++++… | |
| M bootstrap.sh | 2 +- | |
| A fdm/config | 70 +++++++++++++++++++++++++++++… | |
| M foot/foot.ini | 2 +- | |
| D isync/mbsyncrc | 24 ------------------------ | |
| M lynx/config | 4 ++-- | |
| M mutt/muttrc | 107 +++++++++++++++++++++++------… | |
| D mutt/theme | 94 -----------------------------… | |
| D newsraft/config | 17 ----------------- | |
| D newsraft/feeds | 49 -----------------------------… | |
| D qutebrowser/blank.html | 44 -----------------------------… | |
| D qutebrowser/config.py | 108 -----------------------------… | |
| D qutebrowser/scripts/fingerprint.py | 43 ------------------------------ | |
| D qutebrowser/scripts/gruvbox.py | 332 -----------------------------… | |
| D qutebrowser/scripts/redirects.py | 70 -----------------------------… | |
| D qutebrowser/scripts/user_agent.py | 31 -----------------------------… | |
| D qutebrowser/userscripts/password_f… | 388 ---------------------------… | |
| A sfeed/sfeedrc | 51 +++++++++++++++++++++++++++++… | |
| M sway/config | 7 +++---- | |
| M waybar/config | 3 --- | |
| 32 files changed, 392 insertions(+), 1368 deletions(-) | |
| --- | |
| diff --git a/.gitignore b/.gitignore | |
| @@ -4,11 +4,6 @@ qutebrowser/autoconfig.yml | |
| qutebrowser/bookmarks | |
| qutebrowser/quickmarks | |
| -# mpd | |
| -mpd/mpd.db | |
| -mpd/mpd.pid | |
| -mpd/mpdstate | |
| - | |
| # misc | |
| *.swp | |
| bin/radio | |
| @@ -21,3 +16,8 @@ nvim/lazy-lock.json | |
| # mutt contacts | |
| mutt/aliases | |
| mutt/cache | |
| + | |
| +# sfeeds | |
| +sfeed/feeds | |
| +sfeed/mbox | |
| +sfeed/fdm.cache | |
| diff --git a/README b/README | |
| @@ -7,19 +7,19 @@ | |
| These are my dotfiles. There are many like it, but these are mine. | |
| -They are managed via the bootstrap.sh shell script, this links the files and | |
| -folders in the appropriate place. They are used on Alpine Linux which I use as | |
| -my main desktop OS and are forever evolving. | |
| +They are managed via the bootstrap.sh shell script, this links the files | |
| +and folders in the appropriate place. They are used on Alpine Linux | |
| +which I use as my main desktop OS and are forever evolving. | |
| operating sys : alpine linux | |
| window manager : sway | |
| terminal : foot | |
| launcher : bemenu | |
| - email : neomutt | |
| - browser : qutebrowser / lynx | |
| + email : fdm / mutt | |
| + browser : lynx / librewolf | |
| media : kew / mpv | |
| password mgmt : pass | |
| vpn : mullvad | |
| - news : newsraft | |
| + news : sfeed | |
| diff --git a/ashrc b/ashrc | |
| @@ -11,7 +11,7 @@ export BROWSER="lynx" | |
| export PATH=$PATH:$HOME/bin | |
| # tools | |
| -export OPENER=~/bin/link-handler | |
| +export OPENER=~/bin/link-handler.sh | |
| export BEMENU_OPTS="-l 10 -p '>>> ' --tb '#000000' --tf '#ffffff' --hf '#44444… | |
| # lynx | |
| @@ -54,7 +54,7 @@ alias gma='git commit -am' | |
| # neo | |
| alias vim='nvim' | |
| -alias mutt='neomutt' | |
| +#alias mutt='neomutt' | |
| alias mpv="mpv --autofit=30% --really-quiet --no-terminal" | |
| # vpn | |
| diff --git a/bin/fdm_parse_feeds.sh b/bin/fdm_parse_feeds.sh | |
| @@ -0,0 +1,24 @@ | |
| +#!/bin/sh | |
| +# | |
| +# reads text from stdin containing a url. The url is then parsed | |
| +# by rdrview, https://github.com/eafer/rdrview, and the url content | |
| +# returned appending to the end of the original text. | |
| +# | |
| +# I use this with sfeed and fdm to download feed contents without the | |
| +# need of a browser. | |
| + | |
| +data=$(cat) | |
| + | |
| +url=$(echo "$data" | grep -o -E 'https?://[^"]+|gemini://[^"]+') | |
| +uri_lower="$(printf "%s" "$url" | tr '[:upper:]' '[:lower:]')" | |
| + | |
| +case "$uri_lower" in | |
| +'gemini:'*) | |
| + content=$(gemget -o - "$url") | |
| + ;; | |
| +'http'*) | |
| + content=$(rdrview -H "$url" | lynx -stdin --dump -force_html) | |
| + ;; | |
| +esac | |
| + | |
| +printf "%s\n\n%s" "$data" "$content" | |
| diff --git a/bin/link-handler b/bin/link-handler | |
| @@ -1,40 +0,0 @@ | |
| -#!/bin/sh | |
| - | |
| -launcher="setsid" | |
| - | |
| -# applications | |
| -player="mpv --autofit=30% --really-quiet --no-terminal" | |
| -gemini="foot -e amfora" | |
| -gopher="foot -e lynx" | |
| -pdf="zathura" | |
| -images="swayimg" | |
| -torrent="qbittorrent" | |
| -browser="foot -e rdrview" | |
| - | |
| -uri="$1" | |
| -uri_lower="$(printf "%s" "$uri" | tr '[:upper:]' '[:lower:]')" | |
| - | |
| -case "$uri_lower" in | |
| - *.mkv | *.mp4 | *.webm | *youtube.com* | *odysee.com*) | |
| - $player "$uri" & | |
| - ;; | |
| - *.gmi | gemini:*) | |
| - $gemini "$uri" | |
| - ;; | |
| - gopher:*) | |
| - $gopher "$uri" & | |
| - ;; | |
| - magnet:*) | |
| - $launcher "$torrent" "$uri" & | |
| - ;; | |
| - *.pdf | *.ps | *.epub) | |
| - $launcher "$pdf" "$uri" | |
| - ;; | |
| - *.jpg | *.jpe | *.jpeg | *.png | *.gif | *.webp) | |
| - $launcher "$images" "$uri" | |
| - ;; | |
| - *) | |
| - #$launcher "$BROWSER" "$uri" | |
| - $launcher $browser "$uri" | |
| - ;; | |
| -esac | |
| diff --git a/bin/link-handler.sh b/bin/link-handler.sh | |
| @@ -0,0 +1,39 @@ | |
| +#!/bin/sh | |
| + | |
| +launcher="setsid" | |
| + | |
| +# applications | |
| +player="mpv --autofit=30% --really-quiet --no-terminal" | |
| +gemini="foot -e amfora" | |
| +gopher="foot -e lynx" | |
| +pdf="zathura" | |
| +images="swayimg" | |
| +torrent="qbittorrent" | |
| +browser="foot -e rdrview" | |
| + | |
| +uri="$1" | |
| +uri_lower="$(printf "%s" "$uri" | tr '[:upper:]' '[:lower:]')" | |
| + | |
| +case "$uri_lower" in | |
| + *.mkv | *.mp4 | *.webm | *youtube.com* | *odysee.com*) | |
| + $player "$uri" & | |
| + ;; | |
| + *.gmi | gemini:*) | |
| + $launcher $gemini "$uri" | |
| + ;; | |
| + gopher:*) | |
| + $gopher "$uri" & | |
| + ;; | |
| + magnet:*) | |
| + $launcher "$torrent" "$uri" & | |
| + ;; | |
| + *.pdf | *.ps | *.epub) | |
| + $launcher "$pdf" "$uri" | |
| + ;; | |
| + *.jpg | *.jpe | *.jpeg | *.png | *.gif | *.webp) | |
| + $launcher "$images" "$uri" | |
| + ;; | |
| + *) | |
| + $launcher $browser "$uri" | |
| + ;; | |
| +esac | |
| diff --git a/bin/music b/bin/music.sh | |
| diff --git a/bin/offline.sh b/bin/offline.sh | |
| @@ -0,0 +1,10 @@ | |
| +#!/bin/sh | |
| + | |
| +# youtube videos | |
| +ytd.sh | |
| + | |
| +# rss feeds (http/gemini) download | |
| +update_feeds.sh | |
| + | |
| +fdm -f ~/.config/fdm/config fetch | |
| diff --git a/bin/switch_audio b/bin/old/switch_audio | |
| diff --git a/bin/update_feeds.sh b/bin/update_feeds.sh | |
| @@ -0,0 +1,20 @@ | |
| +#!/bin/sh | |
| +# | |
| +# wrapper for managing my feed process. | |
| +# - update new feeds | |
| +# - generate mbox of feeds | |
| +# - parse feeds with fdm and push to Maildir format. | |
| + | |
| +sfeedroot="$HOME/.config/sfeed" | |
| +feedsdir="${sfeedroot}/feeds" | |
| +fdmconfig="$HOME/.config/fdm/config" | |
| + | |
| +if ! test -r "${fdmconfig}"; then | |
| + echo "fdm configuration file \"${fdmconfig}\" does not exist or is not… | |
| + exit 1 | |
| +fi | |
| + | |
| +sfeed_update "${sfeedroot}/sfeedrc" | |
| + | |
| +sfeed_mbox "${feedsdir}"/* >~/.config/sfeed/mbox | |
| +fdm -f "${fdmconfig}" -afeeds fetch | |
| diff --git a/bin/yt-feedurl b/bin/yt-feedurl.sh | |
| diff --git a/bin/ytd b/bin/ytd | |
| @@ -1,77 +0,0 @@ | |
| -#!/bin/sh | |
| - | |
| -# yt-dlp subscription fetcher | |
| -# jay <[email protected]> | |
| - | |
| -savepath="$HOME/media/youtube" | |
| -cachedir="$HOME/.cache/yt_dl" | |
| -yt="yt-dlp" | |
| -baseurl="https://www.youtube.com/playlist?list=" | |
| -ody_url="https://odysee.com/" | |
| - | |
| -info() { | |
| - printf "\033[35mYT ➤\033[36m %s\033[0m\n" "$1" | |
| -} | |
| - | |
| -main() { | |
| - mkdir -p "${cachedir}" | |
| - mkdir -p "${savepath}" | |
| - | |
| - action="$1" | |
| - | |
| - "$action" "steve1989mreinfo" "UU2I6Et1JkidnnbWgJFiMeHA" | |
| - "$action" "simon_wilson" "UUQCrKxBj5Id79syQEsY2Qxg" | |
| - "$action" "c90adventures" "UUVqpNG1R72i21jh-nAxEk4A" | |
| - "$action" "indigo_traveller" "UUXulruMI7BHj3kGyosNa0jA" | |
| - "$action" "pppeter" "UUnHEz9DZ6EAof1-DaQGD_Xw" | |
| - "$action" "abroad_in_japan" "UUHL9bfHTxCMi-7vfxQ-AYtg" | |
| - "$action" "serpentza" "UUl7mAGnY4jh4Ps8rhhh8XZg" | |
| - "$action" "the_lazy_peon" "UUE-f0sqi-H7kuLT0YiW9rcA" | |
| - "$action" "zav_alsop" "UUcjx6m03fZwtRBFn1Cf7kKQ" | |
| - "$action" "steve_marsh" "UUBhQuxcHU3aydk_zTXcbdTg" | |
| - "$action" "planes_trains_everything" "UUcKw8Eg0FfRvhIAnC0cPGAA" | |
| - "$action" "we_hate_the_cold" "UULmltEyJ0zBsKnL8bWSdn3A" | |
| - "$action" "astonishing_glasgow" "UUIDIqg7LhjLFCyD2awY_38g" | |
| - "$action" "drain_cleaning_aus" "UU7sGXeJOixPBgJ3r5R55JYg" | |
| - "$action" "mike_okay" "UUpp3cHR9TWVyXqL1AVw4XkA" | |
| - "$action" "rhykker" "UURl31PWkfF0a3j3hiDRaCGA" | |
| - "$action" "brodie_robertson" "UUld68syR8Wi-GY_n4CaoJGA" | |
| - "$action" "distrotube" "UUVls1GmFKf6WlTraIb_IaJg" | |
| - "$action" "max_roving" "UUOxpcQ7KtZc7fd0jhnWS0Sg" | |
| - "$action" "misfit_minds" "UUEpHkpv4_CgZIEadjjOv4jA" | |
| - "$action" "better_offline" "UUsdzuPs5NKvdsBkQnP7Af8w" | |
| - "$action" "simon_doherty" "UU2smcaU7852QtVvJz48dCRw" | |
| - "$action" "phil_carr" "UULva3lkHR6B5OO-eiVaPnDg" | |
| - "$action" "andrea_borman" "UUJsinEiaDqEn8a-GcADVEVA" | |
| - "$action" "veronica_explains" "UUMiyV_Ib77XLpzHPQH_q0qQ" | |
| - "$action" "chubby_trekka" "UU5YskHOZiTEzjdps94jFX1g" | |
| - "$action" "bythecurb" "UUUZ68a2OJnyTutbTNG1tSpA" | |
| -} | |
| - | |
| -get_video() { | |
| - info "Fetching latest from $1" | |
| - mkdir -p "${savepath}/${1}" | |
| - | |
| - "$yt" -q --restrict-filename \ | |
| - --download-archive "${cachedir}/${1}" \ | |
| - "${baseurl}${2}" \ | |
| - -o "${savepath}/${1}/%(playlist_index)s_%(title)s.%(ext)s" | |
| -} | |
| - | |
| -catchup() { | |
| - info "Catching up on $1" | |
| - "$yt" --flat-playlist --get-id \ | |
| - "${baseurl}${2}" | sed 's/.*/youtube &/' >"${cachedir}/${1}" | |
| -} | |
| - | |
| -case "$1" in | |
| --m) | |
| - main catchup | |
| - ;; | |
| --n) | |
| - catchup "$2" "$3" | |
| - ;; | |
| -*) | |
| - main get_video | |
| - ;; | |
| -esac | |
| diff --git a/bin/ytd.sh b/bin/ytd.sh | |
| @@ -0,0 +1,78 @@ | |
| +#!/bin/sh | |
| + | |
| +# yt-dlp subscription fetcher | |
| +# jay <[email protected]> | |
| + | |
| +savepath="$HOME/media/youtube" | |
| +cachedir="$HOME/.cache/yt_dl" | |
| +yt="yt-dlp" | |
| +baseurl="https://www.youtube.com/playlist?list=" | |
| + | |
| +info() { | |
| + printf "\033[35mYT ➤\033[36m %s\033[0m\n" "$1" | |
| +} | |
| + | |
| +main() { | |
| + mkdir -p "${cachedir}" | |
| + mkdir -p "${savepath}" | |
| + | |
| + action="$1" | |
| + | |
| + "$action" "steve1989mreinfo" "UU2I6Et1JkidnnbWgJFiMeHA" | |
| + "$action" "simon_wilson" "UUQCrKxBj5Id79syQEsY2Qxg" | |
| + "$action" "c90adventures" "UUVqpNG1R72i21jh-nAxEk4A" | |
| + "$action" "indigo_traveller" "UUXulruMI7BHj3kGyosNa0jA" | |
| + "$action" "pppeter" "UUnHEz9DZ6EAof1-DaQGD_Xw" | |
| + "$action" "abroad_in_japan" "UUHL9bfHTxCMi-7vfxQ-AYtg" | |
| + "$action" "serpentza" "UUl7mAGnY4jh4Ps8rhhh8XZg" | |
| + "$action" "the_lazy_peon" "UUE-f0sqi-H7kuLT0YiW9rcA" | |
| + "$action" "zav_alsop" "UUcjx6m03fZwtRBFn1Cf7kKQ" | |
| + "$action" "steve_marsh" "UUBhQuxcHU3aydk_zTXcbdTg" | |
| + "$action" "planes_trains_everything" "UUcKw8Eg0FfRvhIAnC0cPGAA" | |
| + "$action" "we_hate_the_cold" "UULmltEyJ0zBsKnL8bWSdn3A" | |
| + "$action" "astonishing_glasgow" "UUIDIqg7LhjLFCyD2awY_38g" | |
| + "$action" "drain_cleaning_aus" "UU7sGXeJOixPBgJ3r5R55JYg" | |
| + "$action" "mike_okay" "UUpp3cHR9TWVyXqL1AVw4XkA" | |
| + "$action" "rhykker" "UURl31PWkfF0a3j3hiDRaCGA" | |
| + "$action" "brodie_robertson" "UUld68syR8Wi-GY_n4CaoJGA" | |
| + "$action" "distrotube" "UUVls1GmFKf6WlTraIb_IaJg" | |
| + "$action" "max_roving" "UUOxpcQ7KtZc7fd0jhnWS0Sg" | |
| + "$action" "misfit_minds" "UUEpHkpv4_CgZIEadjjOv4jA" | |
| + "$action" "better_offline" "UUsdzuPs5NKvdsBkQnP7Af8w" | |
| + "$action" "simon_doherty" "UU2smcaU7852QtVvJz48dCRw" | |
| + "$action" "phil_carr" "UULva3lkHR6B5OO-eiVaPnDg" | |
| + "$action" "andrea_borman" "UUJsinEiaDqEn8a-GcADVEVA" | |
| + "$action" "veronica_explains" "UUMiyV_Ib77XLpzHPQH_q0qQ" | |
| + "$action" "chubby_trekka" "UU5YskHOZiTEzjdps94jFX1g" | |
| + "$action" "bythecurb" "UUUZ68a2OJnyTutbTNG1tSpA" | |
| + "$action" "naomibrockwell" "UUSuHzQ3GrHSzoBbwrIq3LLA" | |
| + "$action" "gotbletu" "UUkf4VIqu3Acnfzuk3kRIFwA" | |
| +} | |
| + | |
| +get_video() { | |
| + info "Fetching latest from $1" | |
| + mkdir -p "${savepath}/${1}" | |
| + | |
| + "$yt" -q --restrict-filename \ | |
| + --download-archive "${cachedir}/${1}" \ | |
| + "${baseurl}${2}" \ | |
| + -o "${savepath}/${1}/%(playlist_index)s_%(title)s.%(ext)s" | |
| +} | |
| + | |
| +catchup() { | |
| + info "Catching up on $1" | |
| + "$yt" --flat-playlist --get-id \ | |
| + "${baseurl}${2}" | sed 's/.*/youtube &/' >"${cachedir}/${1}" | |
| +} | |
| + | |
| +case "$1" in | |
| +-m) | |
| + main catchup | |
| + ;; | |
| +-n) | |
| + catchup "$2" "$3" | |
| + ;; | |
| +*) | |
| + main get_video | |
| + ;; | |
| +esac | |
| diff --git a/bootstrap.sh b/bootstrap.sh | |
| @@ -4,7 +4,7 @@ DOTFILES=$(pwd) | |
| FILES='ashrc profile' | |
| ROOT='bin' | |
| -CONFIG='foot git isync lynx mutt newsraft nvim qutebrowser sway waybar' | |
| +CONFIG='fdm foot git lynx mutt nvim sfeed sway waybar' | |
| link() { | |
| for f in $FILES; do ln -sfn "$DOTFILES/$f" "$HOME/.$f"; done | |
| diff --git a/fdm/config b/fdm/config | |
| @@ -0,0 +1,70 @@ | |
| + | |
| +# commands | |
| +$imap_pass = $(pass tech/mailbox.org | head -n1) | |
| + | |
| +# macros. | |
| +$path = "%h/.mail" | |
| +$feedcache = "%h/.mail/fdm.cache" | |
| +$feeddir = "%h/.mail/feeds/" | |
| +$listdir = "%h/.mail/ml" | |
| +$strurl = "(http[s]?://.*|gemini://.*)" | |
| + | |
| +# options | |
| +set unmatched-mail keep | |
| +set no-received | |
| +cache "${feedcache}" | |
| + | |
| +# accounts | |
| +account "feeds" disabled mbox "%[home]/.config/sfeed/mbox" | |
| +account "personal" imaps | |
| + server "imap.mailbox.org" | |
| + port 993 | |
| + user "[email protected]" | |
| + pass "${imap_pass}" | |
| + | |
| +# maildirs | |
| +action "inbox" maildir "${path}/%u/Inbox" | |
| + | |
| +# mailing lists | |
| +action "freebsd-announce" maildir "${listdir}/freebsd.announce" | |
| +action "freebsd-current" maildir "${listdir}/freebsd.current" | |
| +action "freebsd-questions" maildir "${listdir}/freebsd.questions" | |
| +action "alpine-users" maildir "${listdir}/alpine.users" | |
| +action "alpine-aports" maildir "${listdir}/alpine.aports" | |
| +action "alpine-announce" maildir "${listdir}/alpine.announce" | |
| +action "alpine-devel" maildir "${listdir}/alpine.devel" | |
| + | |
| +# feeds | |
| +action "feedtag" tag "msgid" value "%1" | |
| +action "feedget" rewrite "%h/bin/fdm_parse_feeds.sh" | |
| +action "feedsave" { | |
| + maildir "${feeddir}%1" | |
| + add-to-cache "${feedcache}" key "%[msgid]" | |
| + keep | |
| +} | |
| + | |
| +# alpine | |
| +match "^List-Id:.*lists\\.alpinelinux\\.org" in headers { | |
| + match "^List-Id:.*announce" in headers action "alpine-announce" | |
| + match "^List-Id:.*devel" in headers action "alpine-devel" | |
| + match "^List-Id:.*users" in headers action "alpine-users" | |
| + match "^List-Id:.*aports" in headers action "alpine-aports" | |
| +} | |
| + | |
| +# freebsd | |
| +match "^List-Id:.*freebsd-.*\\.freebsd\\.org" in headers { | |
| + match "^List-Id:.*announce" in headers action "freebsd-announce" | |
| + match "^List-Id:.*current" in headers action "freebsd-current" | |
| + match "^List-Id:.*questions" in headers action "freebsd-questions" | |
| +} | |
| + | |
| +# sfeeds | |
| +match account "feeds" { | |
| + match case "^Message-ID: (.*)" in headers action "feedtag" continue | |
| + match matched and in-cache "${feedcache}" key "%[msgid]" action keep | |
| + match $strurl action "feedget" continue | |
| + match case "^X-Feedname: (.*)" in headers action "feedsave" | |
| +} | |
| + | |
| +# match all mail and deliver using the 'inbox' action. | |
| +match all action "inbox" | |
| diff --git a/foot/foot.ini b/foot/foot.ini | |
| @@ -1,7 +1,7 @@ | |
| font=Hack:size=16 | |
| [url] | |
| -launch=link-handler ${url} | |
| +launch=link-handler.sh ${url} | |
| #[key-bindings] | |
| #show-urls-launch=Control+Shift+o | |
| diff --git a/isync/mbsyncrc b/isync/mbsyncrc | |
| @@ -1,24 +0,0 @@ | |
| -Create Both | |
| -Expunge Both | |
| -Remove Both | |
| -Sync All | |
| -SyncState * | |
| - | |
| -IMAPAccount jay | |
| -Host imap.mailbox.org | |
| -User [email protected] | |
| -PassCmd "pass show tech/smtp.mailbox.org" | |
| -TLSType IMAPS | |
| - | |
| -IMAPStore jay-remote | |
| -Account jay | |
| - | |
| -MaildirStore jay-local | |
| -SubFolders Verbatim | |
| -Path ~/.mail/jay/ | |
| -Inbox ~/.mail/jay/Inbox | |
| - | |
| -Channel jay | |
| -Far :jay-remote: | |
| -Near :jay-local: | |
| -Patterns * | |
| diff --git a/lynx/config b/lynx/config | |
| @@ -8,7 +8,7 @@ CHARACTER_SET:utf-8 | |
| ASSUME_CHARSET:utf-8 | |
| # image handing | |
| -XLOADIMAGE_COMMAND:link-handler %s& | |
| +XLOADIMAGE_COMMAND:link-handler.sh %s& | |
| NO_PAUSE:TRUE | |
| DEFAULT_EDITOR:/usr/bin/nvim | |
| @@ -17,7 +17,7 @@ DEFAULT_EDITOR:/usr/bin/nvim | |
| DEFAULT_KEYPAD_MODE:LINKS_ARE_NUMBERED | |
| # clean and read | |
| -EXTERNAL:http:link-handler '%s' | |
| +EXTERNAL:http:link-handler.sh '%s' | |
| # hide help menus | |
| DEFAULT_USER_MODE:ADVANCED | |
| diff --git a/mutt/muttrc b/mutt/muttrc | |
| @@ -1,10 +1,13 @@ | |
| -source ~/.config/mutt/gruvbox | |
| - | |
| # info | |
| +set my_user = '[email protected]' | |
| +set my_pass = `pass tech/mailbox.org | head -n1` | |
| set realname = 'Jay Scott' | |
| set from = '[email protected]' | |
| -set my_user = '[email protected]' | |
| -set my_pass = "`pass tech/smtp.mailbox.org`" | |
| + | |
| +# SMTP settings | |
| +set smtp_pass = $my_pass | |
| +set smtp_url = smtps://[email protected] | |
| +set ssl_force_tls = yes | |
| # general | |
| set envelope_from = yes | |
| @@ -25,7 +28,7 @@ bind compose p pgp-menu | |
| set pgp_use_gpg_agent = yes | |
| set pgp_sign_as = 0726AF07C73389E1E4475B7EC88BBC696A39CCB0 | |
| set pgp_timeout = 3600 | |
| -set crypt_autosign = no | |
| +set crypt_autosign = yes | |
| set crypt_replyencrypt = yes | |
| # html emails | |
| @@ -41,6 +44,7 @@ set folder = ~/.mail | |
| set header_cache = ~/.config/mutt/cache/headers | |
| set message_cachedir = ~/.config/mutt/cache/bodies | |
| set mailcap_path = ~/.config/mutt/mailcap | |
| +set alias_file = ~/.config/mutt/aliases | |
| set tmpdir = ~/.cache/ | |
| set spoolfile = "+jay/Inbox" | |
| @@ -48,48 +52,97 @@ set postponed = "+jay/Drafts" | |
| set record = "+jay/Sent" | |
| # inbox | |
| +mailboxes +jay | |
| mailboxes ! `echo ~/.mail/jay/*` | |
| -# SMTP settings | |
| -set smtp_pass = $my_pass | |
| -set smtp_url = smtps://[email protected] | |
| -set ssl_force_tls = yes | |
| +# mailing lists | |
| +mailboxes +mailinglists | |
| +mailboxes ! `echo ~/.mail/ml/*` | |
| -# aliases | |
| -set alias_file = ~/.config/mutt/aliases | |
| -set sort_alias = alias | |
| -set reverse_alias = yes | |
| -source $alias_file | |
| +# feeds | |
| +mailboxes +feeds | |
| +mailboxes ! `echo ~/.mail/feeds/*` | |
| + | |
| +set sort_alias = alias | |
| +set reverse_alias = yes | |
| +source $alias_file | |
| # macros | |
| -bind index g noop | |
| bind index gg first-entry | |
| bind index G last-entry | |
| bind index <space> collapse-thread | |
| macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "… | |
| -macro index o "<shell-escape>mbsync -a -c \"$XDG_CONFIG_HOME\"/isync/mbsyncrc<… | |
| +macro index o "<shell-escape>fdm -f ~/.config/fdm/config fetch<enter>" "run fd… | |
| macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox" | |
| macro index A "<save-message>=jay/archive<enter><enter><sync-mailbox><enter>" … | |
| macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox" | |
| -macro index,pager O "<pipe-message>urlscan -c<Enter>" "call urlscan to extract… | |
| # sorting | |
| -set sort = threads | |
| -set sort_aux = reverse-date | |
| +set sort = threads | |
| +set sort_aux = reverse-date | |
| set pager_index_lines = 15 | |
| -set pager_context = 1 | |
| -set index_format = '%Z | %{%b %d %Y} | %-15.15F | %s' | |
| +set pager_context = 1 | |
| +set index_format = '%Z | %{%b %d %Y} | %-15.15F | %s' | |
| + | |
| +# sidebar | |
| +set mail_check_stats = yes | |
| +set sidebar_visible = yes | |
| +set sidebar_width = 25 | |
| +set sidebar_short_path = yes | |
| +set sidebar_folder_indent = yes | |
| +set sidebar_format = "%B%* %?N?%N?" | |
| +set sidebar_divider_char = │ | |
| +bind index,pager \Ck sidebar-prev | |
| +bind index,pager <tab> sidebar-next | |
| +bind index,pager <backtab> sidebar-prev | |
| +bind index,pager \Cl sidebar-open | |
| # disable help menu | |
| -set help = yes | |
| +set help = no | |
| # status bar | |
| set sidebar_delim_chars = "/" | |
| set status_chars = " *%A" | |
| set status_format = "───[ Folder: %f ]───[%r%m messages%?n… | |
| -ignore * | |
| -unignore from date subject to cc | |
| -unignore x-mailer | |
| -unignore x-spam-status | |
| -unignore x-spam-report | |
| +# default | |
| +color normal color223 color0 | |
| + | |
| +# status bar | |
| +color status color8 color0 | |
| + | |
| +# highlight bar | |
| +color indicator color223 color237 | |
| + | |
| +# replied to | |
| +color index color2 color0 ~Q | |
| + | |
| +# email info header | |
| +color header color11 color0 "^(To:|From:|Date:|^Subject:)" | |
| + | |
| +# web links | |
| +color body color2 color0 "https?://[^ ]+" | |
| +color body color2 color0 "www.[^ ]+" | |
| + | |
| +# email addresss | |
| +color body color2 color0 "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+" | |
| +color body color2 color0 "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+" | |
| + | |
| +# image links | |
| +color body color2 color0 "\\[image\\ [0-9]+\\]" | |
| + | |
| +# sidebar | |
| +color sidebar_new bold color11 color0 | |
| +color sidebar_divider bold color2 color0 | |
| + | |
| +# patch syntax | |
| +color body brightwhite default ^[[:space:]].* | |
| +color body brightwhite default ^(diff).* | |
| +color body white default ^[\-\-\-].* | |
| +color body white default ^[\+\+\+].* | |
| +color body green default ^[\+].* | |
| +color body red default ^[\-].* | |
| +color body brightblue default [@@].* | |
| +color body brightwhite default ^(\s).* | |
| +color body brightwhite default ^(Signed-off-by).* | |
| +color body brightwhite default ^(Cc) | |
| diff --git a/mutt/theme b/mutt/theme | |
| @@ -1,94 +0,0 @@ | |
| - | |
| -color body color136 color234 "(jay|jay.scot)" | |
| - | |
| -# basic colors --------------------------------------------------------- | |
| -color normal color241 color234 | |
| -color error color160 color234 | |
| -color tilde color235 color234 | |
| -color message color37 color234 | |
| -color markers color160 color254 | |
| -color attachment color254 color234 | |
| -color search color61 color234 | |
| -color status color241 color235 | |
| -color indicator color234 color136 | |
| -color tree color136 color234 | |
| - | |
| -# basic monocolor screen | |
| -mono bold bold | |
| -mono underline underline | |
| -mono indicator reverse | |
| -mono error bold | |
| - | |
| -# index ---------------------------------------------------------------- | |
| - | |
| -color index color160 color234 "~A" … | |
| -color index color166 color234 "~E" … | |
| -color index color33 color234 "~N" … | |
| -color index color33 color234 "~O" … | |
| -color index color61 color234 "~Q" … | |
| -color index color240 color234 "~R" … | |
| -color index color33 color234 "~U" … | |
| -color index color33 color234 "~U~$" … | |
| -color index color241 color234 "~v" … | |
| -color index color241 color234 "~P" … | |
| -color index color37 color234 "~p!~F" … | |
| -color index color37 color234 "~N~p!~F" … | |
| -color index color37 color234 "~U~p!~F" … | |
| -color index color240 color234 "~R~p!~F" … | |
| -color index color160 color234 "~F" … | |
| -color index color160 color234 "~F~p" … | |
| -color index color160 color234 "~N~F" … | |
| -color index color160 color234 "~N~F~p" … | |
| -color index color160 color234 "~U~F~p" … | |
| -color index color235 color160 "~D" … | |
| -color index color245 color234 "~v~(!~N)" … | |
| -color index color136 color234 "~v~(~N)" … | |
| -color index color64 color234 "~N~v~(~N)" … | |
| -# statusbg used to indicated flagged when foreground color shows other status | |
| -# for collapsed thread | |
| -color index color160 color235 "~v~(~F)!~N" … | |
| -color index color136 color235 "~v~(~F~N)" … | |
| -color index color64 color235 "~N~v~(~F~N)" … | |
| -color index color64 color235 "~N~v~(~F)" … | |
| -color index color37 color235 "~v~(~p)" … | |
| -color index color136 color160 "~v~(~D)" … | |
| - | |
| -# message headers ------------------------------------------------------ | |
| - | |
| -#color header color240 color234 "^" | |
| -color hdrdefault color240 color234 | |
| -color header color241 color234 "^(From)" | |
| -color header color33 color234 "^(Subject)" | |
| - | |
| -# body ----------------------------------------------------------------- | |
| - | |
| -color quoted color33 color234 | |
| -color quoted1 color37 color234 | |
| -color quoted2 color136 color234 | |
| -color quoted3 color160 color234 | |
| -color quoted4 color166 color234 | |
| - | |
| -color signature color240 color234 | |
| -color bold color235 color234 | |
| -color underline color235 color234 | |
| -color normal color244 color234 | |
| -# | |
| -color body color245 color234 "[;:][-o][)/(|]" # emot… | |
| -color body color245 color234 "[;:][)(|]" # emot… | |
| -color body color245 color234 "[*]?((N)?ACK|CU|LOL|SCNR|… | |
| - |FWIW|vbg|GD&R|HTH|HTHBE|… | |
| - |IRL|RTFM|ROTFL|ROFL|YMMV… | |
| -color body color245 color234 "[ ][*][^*]*[*][ ]?" # mor… | |
| -color body color245 color234 "[ ]?[*][^*]*[*][ ]" # mor… | |
| - | |
| -## pgp | |
| - | |
| -color body color160 color234 "(BAD signature)" | |
| -color body color37 color234 "(Good signature)" | |
| -color body color234 color234 "^gpg: Good signature .*" | |
| -color body color241 color234 "^gpg: " | |
| -color body color241 color160 "^gpg: BAD signature from.… | |
| -mono body bold "^gpg: Good signature" | |
| -mono body bold "^gpg: BAD signature from.… | |
| -color body color160 color234 "([a-z][a-z0-9+-]*://(((([… | |
| -color body color33 color234 "( *[-+=#*~_]){6,}" | |
| diff --git a/newsraft/config b/newsraft/config | |
| @@ -1,17 +0,0 @@ | |
| -# settings | |
| -set open-in-browser-command ~/bin/link-handler "%l" | |
| -list-entry-date-format "%D" | |
| -feeds-menu-paramount-explore true | |
| - | |
| -# key bindings | |
| -bind w exec "~/bin/link-handler %l" | |
| - | |
| -# appearance | |
| -status-placeholder | |
| -set menu-feed-sorting unread-desc | |
| - | |
| -# disable notifications | |
| -notification-command "" | |
| - | |
| -# filters | |
| -set item-rule LOWER(title) NOT LIKE '%trump%' AND LOWER(title) NOT LIKE '%bide… | |
| diff --git a/newsraft/feeds b/newsraft/feeds | |
| @@ -1,49 +0,0 @@ | |
| -@ TECH | |
| -https://noted.lol/rss/ "Noted" | |
| -https://selfh.st/rss/ "Selfh" | |
| -https://planet.kernel.org/rss20.xml "Planet Kernel" | |
| -https://bearblog.dev/discover/feed/ "Bear Blogs" | |
| - | |
| -@ SOFTWARE | |
| -https://www.alpinelinux.org/atom.xml "Alpine Linux" | |
| -https://codeberg.org/newsraft/newsraft.rss "Newsraft" | |
| - | |
| -@ MEDIA | |
| -https://showrss.info/other/all.rss "TV Torrents" | |
| - | |
| -@ PEOPLE | |
| -https://codemadness.org/atom.xml "CodeMadness" | |
| -https://drewdevault.com/blog/index.xml "Drew DeVault" | |
| -http://joeyh.name/blog/index.rss "Joey H" | |
| -https://www.uninformativ.de/blog/feeds/en.atom "Uninformativ" | |
| -https://fabiensanglard.net/rss.xml "Fabiensanglard" | |
| -https://pluralistic.net/feed/ "Pluralistic" | |
| -https://k0.tel/feed.xml "Koutsie" | |
| -https://labnotes.org/rss/ "Lab Notes" | |
| -https://www.jeffgeerling.com/blog.xml "Jeff Geerling" | |
| -https://garfnet.org.uk/cms/feed/ "Garfnet" | |
| -https://bfloeser.de/index.xml "Benedikt" | |
| -https://chromic.org/index.xml "Chromic" | |
| -https://dandelion-utilitarian.com/feed.xml "Dandelion-Utilitarian" | |
| -https://wrongthink.link/posts/index.xml "Wrong Think" | |
| -https://www.cheeyeo.xyz/feed.xml "Chee Yeo" | |
| -https://vkc.sh/feed/ "Veronica" | |
| -https://chriswere.wales/rss.xml "Chris Were" | |
| -https://writer13.neocities.org/rss.xml "Writer 13" | |
| -https://techrights.org/feed.xml "TechRights" | |
| - | |
| -@ GAMING | |
| -https://www.gamingonlinux.com/article_rss.php "Gaming On Linux" | |
| - | |
| -@ ODYSEE | |
| -https://odysee.com/$/rss/@AlphaNerd:8 "Mental Outlaw" | |
| -https://odysee.com/$/rss/@techlore:3 "TechLore" | |
| -https://odysee.com/$/rss/@NaomiBrockwell:4 "Naomi Brockwell" | |
| -https://odysee.com/$/rss/@davidbombal:0 "David Bombal" | |
| -https://odysee.com/$/rss/@thelinuxcast:4 "The Linux Cast" | |
| -https://odysee.com/$/rss/@GreatScott:a "Great Scott" | |
| -https://odysee.com/$/rss/@rossmanngroup:a "Louis Rossmann" | |
| -https://odysee.com/$/rss/@gotbletu:b "Gotbletu" | |
| - | |
| -@ PODCASTS | |
| -http://www.2600.com/oth-broadband.xml "2600" | |
| diff --git a/qutebrowser/blank.html b/qutebrowser/blank.html | |
| @@ -1,44 +0,0 @@ | |
| -<!DOCTYPE html> | |
| -<html lang="en"> | |
| - | |
| - <head> | |
| - <style> | |
| - body { | |
| - color: #cfba58; | |
| - background-color: #191919; | |
| - font-family: monospace; | |
| - } | |
| - | |
| - .flex { | |
| - flex-direction: column; | |
| - display: flex; | |
| - justify-content: center; | |
| - align-items: center; | |
| - margin-top: 450px; | |
| - } | |
| - | |
| - input { | |
| - border: none; | |
| - border-bottom: 2px solid #959A1C; | |
| - min-width: 500px; | |
| - max-width: 750px; | |
| - width: 75%; | |
| - padding-bottom: 10px; | |
| - background-color: transparent; | |
| - color: #fff; | |
| - outline: 0; | |
| - margin-bottom: 20px; | |
| - font-size: 22px; | |
| - } | |
| - </style> | |
| - </head> | |
| - | |
| - <body> | |
| - <div class="flex"> | |
| - <form action="https://html.duckduckgo.com/html" method="get" target="_se… | |
| - <input type="text" name="q" autofocus="autofocus" onfocus="this.select… | |
| - </form> | |
| - </div> | |
| - </body> | |
| - | |
| -</html> | |
| diff --git a/qutebrowser/config.py b/qutebrowser/config.py | |
| @@ -1,108 +0,0 @@ | |
| -config.load_autoconfig(False) | |
| - | |
| -try: | |
| - from qutebrowser.api import message | |
| - | |
| - # gruvbox colour theme | |
| - config.source('scripts/gruvbox.py') | |
| - #config.source('scripts/redirects.py') | |
| - | |
| -except ImportError: | |
| - pass | |
| - | |
| -# default local page | |
| -DEFAULT_PAGE = str(config.configdir / 'blank.html') | |
| - | |
| -# keybinds remapping | |
| -config.bind("xx", "set tabs.show always;; later 5000 set tabs.show switching") | |
| -config.bind("xc", "spawn --userscript password_fill") | |
| -config.bind("zd", "download-open") | |
| -config.bind("xz", "hint links spawn --detach ~/bin/link-handler {hint-url}") | |
| -config.bind("j", "cmd-run-with-count 5 scroll down") | |
| -config.bind("k", "cmd-run-with-count 5 scroll up") | |
| - | |
| -# tabbar | |
| -c.tabs.position = "top" | |
| -c.tabs.show = "multiple" | |
| -c.tabs.title.format = "" | |
| -c.tabs.width = 28 | |
| -c.tabs.favicons.show = "never" | |
| - | |
| -# hints | |
| -c.colors.hints.bg = "rgb(207,186,88)" #cfba58 | |
| -c.colors.hints.fg = "rgb(34, 34, 34)" #222222 | |
| - | |
| -# darkmode | |
| -c.colors.webpage.darkmode.enabled = True | |
| -c.colors.webpage.darkmode.algorithm = 'lightness-cielab' | |
| -c.colors.webpage.darkmode.policy.images = 'never' | |
| -config.set('colors.webpage.darkmode.enabled', False, 'file://*') | |
| - | |
| -# misc | |
| -c.fonts.hints = "14pt Hack" | |
| -c.fonts.default_size = '12pt' | |
| -c.fonts.default_family = 'Hack' | |
| -c.hints.uppercase = True | |
| -c.scrolling.smooth = True | |
| -c.editor.command = ["foot", "vim '{}'"] | |
| -c.auto_save.session = True | |
| -c.zoom.default = "140%" | |
| - | |
| -# ad-block | |
| -c.content.blocking.enabled = True | |
| -c.content.blocking.method = "both" | |
| -c.content.blocking.adblock.lists = [ | |
| - "https://easylist.to/easylist/easyprivacy.txt", | |
| - "https://secure.fanboy.co.nz/fanboy-cookiemonster.txt", | |
| - "https://easylist.to/easylist/easylist.txt" | |
| -] | |
| - | |
| -# general privacy | |
| -c.completion.web_history.max_items = 0 # no history | |
| -c.downloads.remove_finished = 800 # clear dl history | |
| -c.downloads.location.directory = '~/tmp' | |
| -c.url.default_page = DEFAULT_PAGE | |
| -c.url.start_pages = DEFAULT_PAGE | |
| -c.content.private_browsing = True # always use private browsing | |
| -c.content.register_protocol_handler = False | |
| -c.content.webgl = False | |
| - | |
| -# normally default, lets make sure | |
| -c.content.media.audio_capture = False | |
| -c.content.media.audio_video_capture = False | |
| -c.content.media.video_capture = False | |
| -c.content.desktop_capture = False | |
| -c.content.mouse_lock = False | |
| -c.content.autoplay = False # no autoplay on <video> tags | |
| - | |
| -# fingerprint | |
| -c.content.headers.accept_language = "en-US,en;q=0.5" | |
| -c.content.headers.user_agent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/53… | |
| -c.content.headers.custom = {"accept": "text/html,application/xhtml+xml,applica… | |
| -c.content.headers.referer = "never" | |
| -c.content.cookies.accept = "no-3rdparty" | |
| -c.content.javascript.enabled = False # disable tracking etc | |
| -c.content.canvas_reading = False # canvas blocking | |
| -c.content.geolocation = False # location ident | |
| -c.content.webrtc_ip_handling_policy = "disable-non-proxied-udp" | |
| -c.content.hyperlink_auditing = False # disable pingbacks | |
| -c.content.dns_prefetch = False # disable dns pre-fetching | |
| - | |
| -# search engine shortneners | |
| -c.url.searchengines = { | |
| - "DEFAULT": "https://html.duckduckgo.com/html?q={}", | |
| - "ru": "https://rutracker.org/forum/tracker.php?f=1992&nm={}", | |
| - "wiby": "https://wiby.me/?q={}", | |
| - "!book": "http://libgen.li/search.php?req={}&lg_topic=libgen&open=0&view=s… | |
| - "!wiki": "https://en.wikipedia.org/wiki/Special:Search?search={}", | |
| -} | |
| - | |
| -# javascript whitelist | |
| -js_whitelist = [ | |
| - "*://localhost/*", | |
| - "*://127.0.0.1/*" | |
| -] | |
| - | |
| -for site in js_whitelist: | |
| - with config.pattern(site) as p: | |
| - p.content.javascript.enabled = True | |
| diff --git a/qutebrowser/scripts/fingerprint.py b/qutebrowser/scripts/fingerpri… | |
| @@ -1,43 +0,0 @@ | |
| -import random | |
| -import json | |
| -import datetime | |
| - | |
| -from pathlib import Path | |
| -from qutebrowser.api import message, interceptor | |
| - | |
| -home = str(config.configdir) | |
| -agentfile = Path("{}/useragent_list.json".format(home)) | |
| - | |
| -fp_timer = datetime.datetime.now() + datetime.timedelta(minutes=1) | |
| - | |
| -if agentfile.is_file(): | |
| - with open(agentfile, "r") as filehandle: | |
| - agentList = json.load(filehandle) | |
| - | |
| - | |
| -def fingerprint_getheader(agent): | |
| - | |
| - FP_HTTP_HEADER = { | |
| - "Firefox": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;… | |
| - "Chrome": "text/html,application/xhtml+xml,application/xml;q=0.9,image… | |
| - "Edge": "text/html, application/xhtml+xml, image/jxr, */*", | |
| - "Opera": "text/html, application/xml;q=0.9, application/xhtml+xml, ima… | |
| - "Safari": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q… | |
| - } | |
| - | |
| - for a, h in FP_HTTP_HEADER.items(): | |
| - if "{a}" in agent: | |
| - return h | |
| - | |
| - | |
| -def fingerprint(info: interceptor.Request): | |
| - global fp_timer | |
| - | |
| - if fp_timer < datetime.datetime.now(): | |
| - fp_timer = datetime.datetime.now() + datetime.timedelta(minutes=1) | |
| - agent = random.choice(tuple(agentList)) | |
| - c.content.headers.user_agent = agent | |
| - c.content.headers.custom = {"accept": fingerprint_getheader(agent)} | |
| - | |
| - | |
| -interceptor.register(fingerprint) | |
| diff --git a/qutebrowser/scripts/gruvbox.py b/qutebrowser/scripts/gruvbox.py | |
| @@ -1,332 +0,0 @@ | |
| -# gruvbox dark hard qutebrowser theme by Florian Bruhin <[email protected]> | |
| -# | |
| -# Originally based on: | |
| -# base16-qutebrowser (https://github.com/theova/base16-qutebrowser) | |
| -# Base16 qutebrowser template by theova and Daniel Mulford | |
| -# Gruvbox dark, hard scheme by Dawid Kurek ([email protected]), morhetz (htt… | |
| - | |
| -bg0_hard = "#1d2021" | |
| -bg0_soft = '#32302f' | |
| -bg0_normal = '#282828' | |
| - | |
| -bg0 = bg0_normal | |
| -bg1 = "#3c3836" | |
| -bg2 = "#504945" | |
| -bg3 = "#665c54" | |
| -bg4 = "#7c6f64" | |
| - | |
| -fg0 = "#fbf1c7" | |
| -fg1 = "#ebdbb2" | |
| -fg2 = "#d5c4a1" | |
| -fg3 = "#bdae93" | |
| -fg4 = "#a89984" | |
| - | |
| -bright_red = "#fb4934" | |
| -bright_green = "#b8bb26" | |
| -bright_yellow = "#fabd2f" | |
| -bright_blue = "#83a598" | |
| -bright_purple = "#d3869b" | |
| -bright_aqua = "#8ec07c" | |
| -bright_gray = "#928374" | |
| -bright_orange = "#fe8019" | |
| - | |
| -dark_red = "#cc241d" | |
| -dark_green = "#98971a" | |
| -dark_yellow = "#d79921" | |
| -dark_blue = "#458588" | |
| -dark_purple = "#b16286" | |
| -dark_aqua = "#689d6a" | |
| -dark_gray = "#a89984" | |
| -dark_orange = "#d65d0e" | |
| - | |
| -### Completion | |
| - | |
| -# Text color of the completion widget. May be a single color to use for | |
| -# all columns or a list of three colors, one for each column. | |
| -c.colors.completion.fg = [fg1, bright_aqua, bright_yellow] | |
| - | |
| -# Background color of the completion widget for odd rows. | |
| -c.colors.completion.odd.bg = bg0 | |
| - | |
| -# Background color of the completion widget for even rows. | |
| -c.colors.completion.even.bg = c.colors.completion.odd.bg | |
| - | |
| -# Foreground color of completion widget category headers. | |
| -c.colors.completion.category.fg = bright_blue | |
| - | |
| -# Background color of the completion widget category headers. | |
| -c.colors.completion.category.bg = bg1 | |
| - | |
| -# Top border color of the completion widget category headers. | |
| -c.colors.completion.category.border.top = c.colors.completion.category.bg | |
| - | |
| -# Bottom border color of the completion widget category headers. | |
| -c.colors.completion.category.border.bottom = c.colors.completion.category.bg | |
| - | |
| -# Foreground color of the selected completion item. | |
| -c.colors.completion.item.selected.fg = fg0 | |
| - | |
| -# Background color of the selected completion item. | |
| -c.colors.completion.item.selected.bg = bg4 | |
| - | |
| -# Top border color of the selected completion item. | |
| -c.colors.completion.item.selected.border.top = bg2 | |
| - | |
| -# Bottom border color of the selected completion item. | |
| -c.colors.completion.item.selected.border.bottom = c.colors.completion.item.sel… | |
| - | |
| -# Foreground color of the matched text in the selected completion item. | |
| -c.colors.completion.item.selected.match.fg = bright_orange | |
| - | |
| -# Foreground color of the matched text in the completion. | |
| -c.colors.completion.match.fg = c.colors.completion.item.selected.match.fg | |
| - | |
| -# Color of the scrollbar handle in the completion view. | |
| -c.colors.completion.scrollbar.fg = c.colors.completion.item.selected.fg | |
| - | |
| -# Color of the scrollbar in the completion view. | |
| -c.colors.completion.scrollbar.bg = c.colors.completion.category.bg | |
| - | |
| -### Context menu | |
| - | |
| -# Background color of disabled items in the context menu. | |
| -c.colors.contextmenu.disabled.bg = bg3 | |
| - | |
| -# Foreground color of disabled items in the context menu. | |
| -c.colors.contextmenu.disabled.fg = fg3 | |
| - | |
| -# Background color of the context menu. If set to null, the Qt default is used. | |
| -c.colors.contextmenu.menu.bg = bg0 | |
| - | |
| -# Foreground color of the context menu. If set to null, the Qt default is used. | |
| -c.colors.contextmenu.menu.fg = fg2 | |
| - | |
| -# Background color of the context menu’s selected item. If set to null, the … | |
| -c.colors.contextmenu.selected.bg = bg2 | |
| - | |
| -#Foreground color of the context menu’s selected item. If set to null, the Q… | |
| -c.colors.contextmenu.selected.fg = c.colors.contextmenu.menu.fg | |
| - | |
| -### Downloads | |
| - | |
| -# Background color for the download bar. | |
| -c.colors.downloads.bar.bg = bg0 | |
| - | |
| -# Color gradient start for download text. | |
| -c.colors.downloads.start.fg = bg0 | |
| - | |
| -# Color gradient start for download backgrounds. | |
| -c.colors.downloads.start.bg = bright_blue | |
| - | |
| -# Color gradient end for download text. | |
| -c.colors.downloads.stop.fg = c.colors.downloads.start.fg | |
| - | |
| -# Color gradient stop for download backgrounds. | |
| -c.colors.downloads.stop.bg = bright_aqua | |
| - | |
| -# Foreground color for downloads with errors. | |
| -c.colors.downloads.error.fg = bright_red | |
| - | |
| -### Hints | |
| - | |
| -# Font color for hints. | |
| -c.colors.hints.fg = bg0 | |
| - | |
| -# Background color for hints. | |
| -c.colors.hints.bg = 'rgba(250, 191, 47, 200)' # bright_yellow | |
| - | |
| -# Font color for the matched part of hints. | |
| -c.colors.hints.match.fg = bg4 | |
| - | |
| -### Keyhint widget | |
| - | |
| -# Text color for the keyhint widget. | |
| -c.colors.keyhint.fg = fg4 | |
| - | |
| -# Highlight color for keys to complete the current keychain. | |
| -c.colors.keyhint.suffix.fg = fg0 | |
| - | |
| -# Background color of the keyhint widget. | |
| -c.colors.keyhint.bg = bg0 | |
| - | |
| -### Messages | |
| - | |
| -# Foreground color of an error message. | |
| -c.colors.messages.error.fg = bg0 | |
| - | |
| -# Background color of an error message. | |
| -c.colors.messages.error.bg = bright_red | |
| - | |
| -# Border color of an error message. | |
| -c.colors.messages.error.border = c.colors.messages.error.bg | |
| - | |
| -# Foreground color of a warning message. | |
| -c.colors.messages.warning.fg = bg0 | |
| - | |
| -# Background color of a warning message. | |
| -c.colors.messages.warning.bg = bright_purple | |
| - | |
| -# Border color of a warning message. | |
| -c.colors.messages.warning.border = c.colors.messages.warning.bg | |
| - | |
| -# Foreground color of an info message. | |
| -c.colors.messages.info.fg = fg2 | |
| - | |
| -# Background color of an info message. | |
| -c.colors.messages.info.bg = bg0 | |
| - | |
| -# Border color of an info message. | |
| -c.colors.messages.info.border = c.colors.messages.info.bg | |
| - | |
| -### Prompts | |
| - | |
| -# Foreground color for prompts. | |
| -c.colors.prompts.fg = fg2 | |
| - | |
| -# Border used around UI elements in prompts. | |
| -c.colors.prompts.border = f'1px solid {bg1}' | |
| - | |
| -# Background color for prompts. | |
| -c.colors.prompts.bg = bg3 | |
| - | |
| -# Background color for the selected item in filename prompts. | |
| -c.colors.prompts.selected.bg = bg2 | |
| - | |
| -### Statusbar | |
| - | |
| -# Foreground color of the statusbar. | |
| -c.colors.statusbar.normal.fg = fg2 | |
| - | |
| -# Background color of the statusbar. | |
| -c.colors.statusbar.normal.bg = bg0 | |
| - | |
| -# Foreground color of the statusbar in insert mode. | |
| -c.colors.statusbar.insert.fg = bg0 | |
| - | |
| -# Background color of the statusbar in insert mode. | |
| -c.colors.statusbar.insert.bg = dark_aqua | |
| - | |
| -# Foreground color of the statusbar in passthrough mode. | |
| -c.colors.statusbar.passthrough.fg = bg0 | |
| - | |
| -# Background color of the statusbar in passthrough mode. | |
| -c.colors.statusbar.passthrough.bg = dark_blue | |
| - | |
| -# Foreground color of the statusbar in private browsing mode. | |
| -c.colors.statusbar.private.fg = bright_purple | |
| - | |
| -# Background color of the statusbar in private browsing mode. | |
| -c.colors.statusbar.private.bg = bg0 | |
| - | |
| -# Foreground color of the statusbar in command mode. | |
| -c.colors.statusbar.command.fg = fg3 | |
| - | |
| -# Background color of the statusbar in command mode. | |
| -c.colors.statusbar.command.bg = bg1 | |
| - | |
| -# Foreground color of the statusbar in private browsing + command mode. | |
| -c.colors.statusbar.command.private.fg = c.colors.statusbar.private.fg | |
| - | |
| -# Background color of the statusbar in private browsing + command mode. | |
| -c.colors.statusbar.command.private.bg = c.colors.statusbar.command.bg | |
| - | |
| -# Foreground color of the statusbar in caret mode. | |
| -c.colors.statusbar.caret.fg = bg0 | |
| - | |
| -# Background color of the statusbar in caret mode. | |
| -c.colors.statusbar.caret.bg = dark_purple | |
| - | |
| -# Foreground color of the statusbar in caret mode with a selection. | |
| -c.colors.statusbar.caret.selection.fg = c.colors.statusbar.caret.fg | |
| - | |
| -# Background color of the statusbar in caret mode with a selection. | |
| -c.colors.statusbar.caret.selection.bg = bright_purple | |
| - | |
| -# Background color of the progress bar. | |
| -c.colors.statusbar.progress.bg = bright_blue | |
| - | |
| -# Default foreground color of the URL in the statusbar. | |
| -c.colors.statusbar.url.fg = fg4 | |
| - | |
| -# Foreground color of the URL in the statusbar on error. | |
| -c.colors.statusbar.url.error.fg = dark_red | |
| - | |
| -# Foreground color of the URL in the statusbar for hovered links. | |
| -c.colors.statusbar.url.hover.fg = bright_orange | |
| - | |
| -# Foreground color of the URL in the statusbar on successful load | |
| -# (http). | |
| -c.colors.statusbar.url.success.http.fg = bright_red | |
| - | |
| -# Foreground color of the URL in the statusbar on successful load | |
| -# (https). | |
| -c.colors.statusbar.url.success.https.fg = fg0 | |
| - | |
| -# Foreground color of the URL in the statusbar when there's a warning. | |
| -c.colors.statusbar.url.warn.fg = bright_purple | |
| - | |
| -### tabs | |
| - | |
| -# Background color of the tab bar. | |
| -c.colors.tabs.bar.bg = bg0 | |
| - | |
| -# Color gradient start for the tab indicator. | |
| -c.colors.tabs.indicator.start = bright_blue | |
| - | |
| -# Color gradient end for the tab indicator. | |
| -c.colors.tabs.indicator.stop = bright_aqua | |
| - | |
| -# Color for the tab indicator on errors. | |
| -c.colors.tabs.indicator.error = bright_red | |
| - | |
| -# Foreground color of unselected odd tabs. | |
| -c.colors.tabs.odd.fg = fg2 | |
| - | |
| -# Background color of unselected odd tabs. | |
| -c.colors.tabs.odd.bg = bg2 | |
| - | |
| -# Foreground color of unselected even tabs. | |
| -c.colors.tabs.even.fg = c.colors.tabs.odd.fg | |
| - | |
| -# Background color of unselected even tabs. | |
| -c.colors.tabs.even.bg = bg3 | |
| - | |
| -# Foreground color of selected odd tabs. | |
| -c.colors.tabs.selected.odd.fg = fg2 | |
| - | |
| -# Background color of selected odd tabs. | |
| -c.colors.tabs.selected.odd.bg = bg0 | |
| - | |
| -# Foreground color of selected even tabs. | |
| -c.colors.tabs.selected.even.fg = c.colors.tabs.selected.odd.fg | |
| - | |
| -# Background color of selected even tabs. | |
| -c.colors.tabs.selected.even.bg = bg0 | |
| - | |
| -# Background color of pinned unselected even tabs. | |
| -c.colors.tabs.pinned.even.bg = bright_green | |
| - | |
| -# Foreground color of pinned unselected even tabs. | |
| -c.colors.tabs.pinned.even.fg = bg2 | |
| - | |
| -# Background color of pinned unselected odd tabs. | |
| -c.colors.tabs.pinned.odd.bg = bright_green | |
| - | |
| -# Foreground color of pinned unselected odd tabs. | |
| -c.colors.tabs.pinned.odd.fg = c.colors.tabs.pinned.even.fg | |
| - | |
| -# Background color of pinned selected even tabs. | |
| -c.colors.tabs.pinned.selected.even.bg = bg0 | |
| - | |
| -# Foreground color of pinned selected even tabs. | |
| -c.colors.tabs.pinned.selected.even.fg = c.colors.tabs.selected.odd.fg | |
| - | |
| -# Background color of pinned selected odd tabs. | |
| -c.colors.tabs.pinned.selected.odd.bg = c.colors.tabs.pinned.selected.even.bg | |
| - | |
| -# Foreground color of pinned selected odd tabs. | |
| -c.colors.tabs.pinned.selected.odd.fg = c.colors.tabs.selected.odd.fg | |
| - | |
| -# Background color for webpages if unset (or empty to use the theme's | |
| -# color). | |
| -# c.colors.webpage.bg = bg4 | |
| diff --git a/qutebrowser/scripts/redirects.py b/qutebrowser/scripts/redirects.py | |
| @@ -1,70 +0,0 @@ | |
| -from qutebrowser.api import interceptor | |
| -from urllib.parse import urljoin | |
| -from PyQt6.QtCore import QUrl | |
| -import operator | |
| - | |
| -o = operator.methodcaller | |
| -s = 'setHost' | |
| -i = interceptor | |
| - | |
| -def farside(url: QUrl, i) -> bool: | |
| - url.setHost('farside.link') | |
| - p = url.path().strip('/') | |
| - url.setPath(urljoin(i, p)) | |
| - return True | |
| - | |
| -def nitter(url: QUrl) -> bool: | |
| - return farside(url, '/nitter/') | |
| -def rimgo(url: QUrl) -> bool: | |
| - return farside(url, '/rimgo/') | |
| -def scribe(url: QUrl) -> bool: | |
| - return farside(url, '/scribe/') | |
| -def wikiless(url: QUrl) -> bool: | |
| - return farside(url, '/wikiless/') | |
| -def invid(url: QUrl) -> bool: | |
| - return farside(url, '/invidious/') | |
| -def reddit(url: QUrl) -> bool: | |
| - return farside(url, '/libreddit/') | |
| -def bibliogram(url: QUrl) -> bool: | |
| - return farside(url, '/bibliogram/') | |
| -def simplytranslate(url: QUrl) -> bool: | |
| - return farside(url, '/simplytranslate/') | |
| -def proxitok(url: QUrl) -> bool: | |
| - return farside(url, '/proxitok/') | |
| -def querte (url: QUrl) -> bool: | |
| - return farside(url, '/querte/') | |
| - | |
| -map = { | |
| - "reddit.com": reddit, | |
| - "www.reddit.com": reddit, | |
| - "old.reddit.com": reddit, | |
| - | |
| - "youtu.be": invid, | |
| - "youtube.com": invid, | |
| - "www.youtube.com": invid, | |
| - | |
| - "twitter.com": nitter, | |
| - "mobile.twitter.com": nitter, | |
| - | |
| - "imgur.com" : rimgo, | |
| - "medium.com" : scribe, | |
| - "en.wikipedia.org" : wikiless, | |
| - "www.instagram.com": bibliogram, | |
| - "translate.google.com" : simplytranslate, | |
| - "vm.tiktok.com" : proxitok, | |
| - "www.tiktok.com" : proxitok, | |
| - "www.quora.com": querte, | |
| - | |
| - "www.twitch.tv" : o(s, 'm.twitch.tv'), | |
| - "tumblr.com" : o(s, 'splashblr.fly.dev'), | |
| - "www.npr.org" : o(s, 'text.npr.org'), | |
| - } | |
| -def f(info: i.Request): | |
| - if (info.resource_type != i.ResourceType.main_frame or | |
| - info.request_url.scheme() in {"data", "blob"}): | |
| - return | |
| - url = info.request_url | |
| - redir = map.get(url.host()) | |
| - if redir is not None and redir(url) is not False: | |
| - info.redirect(url) | |
| -i.register(f) | |
| diff --git a/qutebrowser/scripts/user_agent.py b/qutebrowser/scripts/user_agent… | |
| @@ -1,31 +0,0 @@ | |
| -# qutebrowser script to set a random user-agent on launch. Add the following to | |
| -# your qutebrowser config.py file: | |
| -# | |
| -# config.source('scripts/user_agent.py') | |
| -# | |
| -# You can download the most common user-agents with a script like this, I run | |
| -# mine on cron every 3 days. : | |
| -# | |
| -# #!/bin/bash | |
| -# | |
| -# url='https://raw.githubusercontent.com/Kikobeats/top-user-agents/master/inde… | |
| -# path="$HOME/.config/qutebrowser/useragent_list.json" | |
| -# | |
| -# curl "$url" -o "$path" | |
| -# awk '!/Firefox/' "$path" > /tmp/1 && mv /tmp/1 "$path" | |
| - | |
| -import random | |
| -import json | |
| - | |
| -from pathlib import Path | |
| -from qutebrowser.api import message | |
| - | |
| -home = str(config.configdir) | |
| -agentfile = Path("{}/useragent_list.json".format(home)) | |
| - | |
| -if agentfile.is_file(): | |
| - with open(agentfile, "r") as filehandle: | |
| - agentList = json.load(filehandle) | |
| - | |
| - agent = random.choice(tuple(agentList)) | |
| - c.content.headers.user_agent = agent | |
| diff --git a/qutebrowser/userscripts/password_fill b/qutebrowser/userscripts/pa… | |
| @@ -1,388 +0,0 @@ | |
| -#!/usr/bin/env bash | |
| -help() { | |
| - blink=$'\e[1;31m' reset=$'\e[0m' | |
| -cat <<EOF | |
| -This script can only be used as a userscript for qutebrowser | |
| -2015, Thorsten Wißmann <edu _at_ thorsten-wissmann _dot_ de> | |
| -In case of questions or suggestions, do not hesitate to send me an E-Mail or to | |
| -directly ask me via IRC (nickname thorsten\`) in #qutebrowser on Libera Chat. | |
| - | |
| - $blink!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$reset | |
| - WARNING: the passwords are stored in qutebrowser's | |
| - debug log reachable via the url qute://log | |
| - $blink!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$reset | |
| - | |
| -Usage: run as a userscript form qutebrowser, e.g.: | |
| - spawn --userscript ~/.config/qutebrowser/password_fill | |
| - | |
| -Pass backend: (see also passwordstore.org) | |
| - This script expects pass to store the credentials of each page in an extra | |
| - file, where the filename (or filepath) contains the domain of the respective | |
| - page. The first line of the file must contain the password, the login name | |
| - must be contained in a later line beginning with "user:", "login:", or | |
| - "username:" (configurable by the user_pattern variable). | |
| - | |
| -Behavior: | |
| - It will try to find a username/password entry in the configured backend | |
| - (currently only pass) for the current website and will load that pair of | |
| - username and password to any form on the current page that has some password | |
| - entry field. If multiple entries are found, a zenity menu is offered. | |
| - | |
| - If no entry is found, then it crops subdomains from the url if at least one | |
| - entry is found in the backend. (In that case, it always shows a menu) | |
| - | |
| -Configuration: | |
| - This script loads the bash script ~/.config/qutebrowser/password_fill_rc (if | |
| - it exists), so you can change any configuration variable and overwrite any | |
| - function you like. | |
| - | |
| -EOF | |
| -} | |
| - | |
| -set -o errexit | |
| -set -o pipefail | |
| -shopt -s nocasematch # make regexp matching in bash case insensitive | |
| - | |
| -if [ -z "$QUTE_FIFO" ] ; then | |
| - help | |
| - exit | |
| -fi | |
| - | |
| -error() { | |
| - local msg="$*" | |
| - echo "message-error '${msg//\'/\\\'}'" >> "$QUTE_FIFO" | |
| -} | |
| -msg() { | |
| - local msg="$*" | |
| - echo "message-info '${msg//\'/\\\'}'" >> "$QUTE_FIFO" | |
| -} | |
| -die() { | |
| - error "$*" | |
| - exit 0 | |
| -} | |
| - | |
| -javascript_escape() { | |
| - # print the first argument in an escaped way, such that it can safely | |
| - # be used within javascripts double quotes | |
| - # shellcheck disable=SC2001 | |
| - sed "s,[\\\\'\"],\\\\&,g" <<< "$1" | |
| -} | |
| - | |
| -# ======================================================= # | |
| -# CONFIGURATION | |
| -# ======================================================= # | |
| -# The configuration file is per default located in | |
| -# ~/.config/qutebrowser/password_fill_rc and is a bash script that is loaded | |
| -# later in the present script. So basically you can replace all of the | |
| -# following definitions and make them fit your needs. | |
| - | |
| -# The following simplifies a URL to the domain (e.g. "wiki.qutebrowser.org") | |
| -# which is later used to search the correct entries in the password backend. If | |
| -# you e.g. don't want the "www." to be removed or if you want to distinguish | |
| -# between different paths on the same domain. | |
| - | |
| -simplify_url() { | |
| - simple_url="${1##*://}" # remove protocol specification | |
| - simple_url="${simple_url%%\?*}" # remove GET parameters | |
| - simple_url="${simple_url%%/*}" # remove directory path | |
| - simple_url="${simple_url%:*}" # remove port | |
| - simple_url="${simple_url##www.}" # remove www. subdomain | |
| -} | |
| - | |
| -# no_entries_found() is called if the first query_entries() call did not find | |
| -# any matching entries. Multiple implementations are possible: | |
| -# The easiest behavior is to quit: | |
| -#no_entries_found() { | |
| -# if [ 0 -eq "${#files[@]}" ] ; then | |
| -# die "No entry found for »$simple_url«" | |
| -# fi | |
| -#} | |
| -# But you could also fill the files array with all entries from your pass db | |
| -# if the first db query did not find anything | |
| -# no_entries_found() { | |
| -# if [ 0 -eq "${#files[@]}" ] ; then | |
| -# query_entries "" | |
| -# if [ 0 -eq "${#files[@]}" ] ; then | |
| -# die "No entry found for »$simple_url«" | |
| -# fi | |
| -# fi | |
| -# } | |
| - | |
| -# Another behavior is to drop another level of subdomains until search hits | |
| -# are found: | |
| -no_entries_found() { | |
| - while [ 0 -eq "${#files[@]}" ] && [ -n "$simple_url" ]; do | |
| - # shellcheck disable=SC2001 | |
| - shorter_simple_url=$(sed 's,^[^.]*\.,,' <<< "$simple_url") | |
| - if [ "$shorter_simple_url" = "$simple_url" ] ; then | |
| - # if no dot, then even remove the top level domain | |
| - simple_url="" | |
| - query_entries "$simple_url" | |
| - break | |
| - fi | |
| - simple_url="$shorter_simple_url" | |
| - query_entries "$simple_url" | |
| - #die "No entry found for »$simple_url«" | |
| - # enforce menu if we do "fuzzy" matching | |
| - menu_if_one_entry=1 | |
| - done | |
| - if [ 0 -eq "${#files[@]}" ] ; then | |
| - die "No entry found for »$simple_url«" | |
| - fi | |
| -} | |
| - | |
| -# Backend implementations tell, how the actual password store is accessed. | |
| -# Right now, there is only one fully functional password backend, namely for | |
| -# the program "pass". | |
| -# A password backend consists of three actions: | |
| -# - init() initializes backend-specific things and does sanity checks. | |
| -# - query_entries() is called with a simplified url and is expected to fill | |
| -# the bash array $files with the names of matching password entries. There | |
| -# are no requirements how these names should look like. | |
| -# - open_entry() is called with some specific entry of the $files array and is | |
| -# expected to write the username of that entry to the $username variable and | |
| -# the corresponding password to $password | |
| - | |
| -# shellcheck disable=SC2329 | |
| -reset_backend() { | |
| - init() { true ; } | |
| - query_entries() { true ; } | |
| - open_entry() { true ; } | |
| -} | |
| - | |
| -# choose_entry() is expected to choose one entry from the array $files and | |
| -# write it to the variable $file. | |
| -choose_entry() { | |
| - choose_entry_zenity | |
| -} | |
| - | |
| -# The default implementation chooses a random entry from the array. So if there | |
| -# are multiple matching entries, multiple calls to this userscript will | |
| -# eventually pick the "correct" entry. I.e. if this userscript is bound to | |
| -# "zl", the user has to press "zl" until the correct username shows up in the | |
| -# login form. | |
| -choose_entry_random() { | |
| - local nr=${#files[@]} | |
| - file="${files[$((RANDOM % nr))]}" | |
| - # Warn user, that there might be other matching password entries | |
| - if [ "$nr" -gt 1 ] ; then | |
| - msg "Picked $file out of $nr entries: ${files[*]}" | |
| - fi | |
| -} | |
| - | |
| -# another implementation would be to ask the user via some menu (like rofi or | |
| -# dmenu or zenity or even qutebrowser completion in future?) which entry to | |
| -# pick | |
| -MENU_COMMAND=( head -n 1 ) | |
| -# whether to show the menu if there is only one entry in it | |
| -menu_if_one_entry=0 | |
| -choose_entry_menu() { | |
| - local nr=${#files[@]} | |
| - if [ "$nr" -eq 1 ] && ! ((menu_if_one_entry)) ; then | |
| - file="${files[0]}" | |
| - else | |
| - file=$( printf '%s\n' "${files[@]}" | "${MENU_COMMAND[@]}" ) | |
| - fi | |
| -} | |
| - | |
| -choose_entry_rofi() { | |
| - MENU_COMMAND=( rofi -p "qutebrowser> " -dmenu | |
| - -mesg $'Pick a password entry for <b>'"${QUTE_URL//&/&… | |
| - choose_entry_menu || true | |
| -} | |
| - | |
| -choose_entry_zenity() { | |
| - MENU_COMMAND=( zenity --list --title "qutebrowser password fill" | |
| - --text "Pick the password entry:" | |
| - --column "Name" ) | |
| - choose_entry_menu || true | |
| -} | |
| - | |
| -choose_entry_zenity_radio() { | |
| - # shellcheck disable=SC2329 | |
| - zenity_helper() { | |
| - awk '{ print $0 ; print $0 }' \ | |
| - | zenity --list --radiolist \ | |
| - --title "qutebrowser password fill" \ | |
| - --text "Pick the password entry:" \ | |
| - --column " " --column "Name" | |
| - } | |
| - MENU_COMMAND=( zenity_helper ) | |
| - choose_entry_menu || true | |
| -} | |
| - | |
| -# ======================================================= | |
| -# backend: PASS | |
| - | |
| -# configuration options: | |
| -match_filename=1 # whether allowing entry match by filepath | |
| -match_line=0 # whether allowing entry match by URL-Pattern in file | |
| - # Note: match_line=1 gets very slow, even for small password … | |
| -match_line_pattern='^url: .*' # applied using grep -iE | |
| -user_pattern='^(user|username|login): ' | |
| - | |
| -GPG_OPTS=( "--quiet" "--yes" "--compress-algo=none" "--no-encrypt-to" ) | |
| -GPG="gpg" | |
| -export GPG_TTY="${GPG_TTY:-$(tty 2>/dev/null)}" | |
| -command -v gpg2 &>/dev/null && GPG="gpg2" | |
| -[[ -n $GPG_AGENT_INFO || $GPG == "gpg2" ]] && GPG_OPTS+=( "--batch" "--use-age… | |
| - | |
| -pass_backend() { | |
| - init() { | |
| - PREFIX="${PASSWORD_STORE_DIR:-$HOME/.password-store}" | |
| - if ! [ -d "$PREFIX" ] ; then | |
| - die "Can not open password store dir »$PREFIX«" | |
| - fi | |
| - } | |
| - query_entries() { | |
| - local url="$1" | |
| - | |
| - if ((match_line)) ; then | |
| - # add entries with matching URL-tag | |
| - while read -r -d "" passfile ; do | |
| - if $GPG "${GPG_OPTS[@]}" -d "$passfile" \ | |
| - | grep --max-count=1 -iE "${match_line_pattern}${url}" > … | |
| - then | |
| - passfile="${passfile#"$PREFIX"}" | |
| - passfile="${passfile#/}" | |
| - files+=( "${passfile%.gpg}" ) | |
| - fi | |
| - done < <(find -L "$PREFIX" -iname '*.gpg' -print0) | |
| - fi | |
| - if ((match_filename)) ; then | |
| - # add entries with matching filepath | |
| - while read -r passfile ; do | |
| - passfile="${passfile#"$PREFIX"}" | |
| - passfile="${passfile#/}" | |
| - files+=( "${passfile%.gpg}" ) | |
| - done < <(find -L "$PREFIX" -iname '*.gpg' | grep "$url") | |
| - fi | |
| - } | |
| - open_entry() { | |
| - local path="$PREFIX/${1}.gpg" | |
| - password="" | |
| - local firstline=1 | |
| - while read -r line ; do | |
| - if ((firstline)) ; then | |
| - password="$line" | |
| - firstline=0 | |
| - else | |
| - if [[ $line =~ $user_pattern ]] ; then | |
| - # remove the matching prefix "user: " from the beginning o… | |
| - username=${line#"${BASH_REMATCH[0]}"} | |
| - break | |
| - fi | |
| - fi | |
| - done < <($GPG "${GPG_OPTS[@]}" -d "$path" | awk 1 ) | |
| - } | |
| -} | |
| -# ======================================================= | |
| - | |
| -# ======================================================= | |
| -# backend: secret | |
| -# shellcheck disable=SC2329 | |
| -secret_backend() { | |
| - init() { | |
| - return | |
| - } | |
| - query_entries() { | |
| - local domain="$1" | |
| - while read -r line ; do | |
| - if [[ "$line" == "attribute.username = "* ]] ; then | |
| - files+=("$domain ${line:21}") | |
| - fi | |
| - done < <( secret-tool search --unlock --all domain "$domain" 2>&1 ) | |
| - } | |
| - open_entry() { | |
| - local domain="${1%% *}" | |
| - username="${1#* }" | |
| - password=$(secret-tool lookup domain "$domain" username "$username") | |
| - } | |
| -} | |
| -# ======================================================= | |
| - | |
| -# load some sane default backend | |
| -reset_backend | |
| -pass_backend | |
| -# load configuration | |
| -QUTE_CONFIG_DIR=${QUTE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/qutebrows… | |
| -PWFILL_CONFIG=${PWFILL_CONFIG:-${QUTE_CONFIG_DIR}/password_fill_rc} | |
| -if [ -f "$PWFILL_CONFIG" ] ; then | |
| - # shellcheck source=/dev/null | |
| - source "$PWFILL_CONFIG" | |
| -fi | |
| -init | |
| - | |
| -simplify_url "$QUTE_URL" | |
| -query_entries "${simple_url}" | |
| -no_entries_found | |
| -# remove duplicates | |
| -mapfile -t files < <(printf '%s\n' "${files[@]}" | sort | uniq ) | |
| -choose_entry | |
| -if [ -z "$file" ] ; then | |
| - # choose_entry didn't want any of these entries | |
| - exit 0 | |
| -fi | |
| -open_entry "$file" | |
| -#username="$(date)" | |
| -#password="XYZ" | |
| -#msg "$username, ${#password}" | |
| - | |
| -[ -n "$username" ] || die "Username not set in entry $file" | |
| -[ -n "$password" ] || die "Password not set in entry $file" | |
| - | |
| -js() { | |
| -cat <<EOF | |
| - function isVisible(elem) { | |
| - var style = elem.ownerDocument.defaultView.getComputedStyle(elem, null… | |
| - | |
| - if (style.getPropertyValue("visibility") !== "visible" || | |
| - style.getPropertyValue("display") === "none" || | |
| - style.getPropertyValue("opacity") === "0") { | |
| - return false; | |
| - } | |
| - | |
| - return elem.offsetWidth > 0 && elem.offsetHeight > 0; | |
| - }; | |
| - function hasPasswordField(form) { | |
| - var inputs = form.getElementsByTagName("input"); | |
| - for (var j = 0; j < inputs.length; j++) { | |
| - var input = inputs[j]; | |
| - if (input.type == "password") { | |
| - return true; | |
| - } | |
| - } | |
| - return false; | |
| - }; | |
| - function loadData2Form (form) { | |
| - var inputs = form.getElementsByTagName("input"); | |
| - for (var j = 0; j < inputs.length; j++) { | |
| - var input = inputs[j]; | |
| - if (isVisible(input) && (input.type == "text" || input.type == "em… | |
| - input.focus(); | |
| - input.value = "$(javascript_escape "${username}")"; | |
| - input.dispatchEvent(new Event('change')); | |
| - input.blur(); | |
| - } | |
| - if (input.type == "password") { | |
| - input.focus(); | |
| - input.value = "$(javascript_escape "${password}")"; | |
| - input.dispatchEvent(new Event('change')); | |
| - input.blur(); | |
| - } | |
| - } | |
| - }; | |
| - | |
| - var forms = document.getElementsByTagName("form"); | |
| - for (i = 0; i < forms.length; i++) { | |
| - if (hasPasswordField(forms[i])) { | |
| - loadData2Form(forms[i]); | |
| - } | |
| - } | |
| -EOF | |
| -} | |
| - | |
| -printjs() { | |
| - js | sed 's,//.*$,,' | tr '\n' ' ' | |
| -} | |
| -echo "jseval -q $(printjs)" >> "$QUTE_FIFO" | |
| diff --git a/sfeed/sfeedrc b/sfeed/sfeedrc | |
| @@ -0,0 +1,51 @@ | |
| +sfeedpath="$HOME/.config/sfeed/feeds" | |
| + | |
| +fetch() { | |
| + case "$2" in | |
| + *.gmi | 'gemini:'*) | |
| + gemget -o - "$2" | |
| + ;; | |
| + *) | |
| + curl "$2" 2>/dev/null | |
| + ;; | |
| + esac | |
| +} | |
| + | |
| +feeds() { | |
| + # general | |
| + feed 'tildenews' 'https://tilde.news/newest.rss' | |
| + feed 'tvtorrents' 'https://showrss.info/other/all.rss' | |
| + feed 'gamingonlinux' 'https://www.gamingonlinux.com/article_rss.php' | |
| + feed 'bearblogs' 'https://bearblog.dev/discover/feed/' | |
| + # apps | |
| + feed 'rdrview' 'https://github.com/eafer/rdrview/commits/master.atom' | |
| + feed 'fdm' 'https://github.com/nicm/fdm/commits.atom' | |
| + feed 'sfeed' 'https://codemadness.org/git/sfeed/atom.xml' | |
| + feed 'castget' 'https://github.com/mlj/castget/commits.atom' | |
| + feed 'alpinelinux' 'https://www.alpinelinux.org/atom.xml' | |
| + # gemini | |
| + feed 'midnightpub' 'gemini://midnight.pub/feed.xml' | |
| + feed 'antenna' 'gemini://warmedal.se/~antenna/atom.xml' | |
| + feed 'techrights' 'gemini://gemini.techrights.org/feed.xml' | |
| + feed 'ewok' 'gemini://warmedal.se/~bjorn/atom.xml' | |
| + # people | |
| + feed 'codemadness' 'https://codemadness.org/atom.xml' | |
| + feed 'drewdevault' 'https://drewdevault.com/blog/index.xml' | |
| + feed 'seeshyjo' 'http://joeyh.name/blog/index.rss' | |
| + feed 'unixsheikh' 'https://unixsheikh.com/feed.rss' | |
| + feed 'uninformativ' 'https://www.uninformativ.de/blog/feeds/en.atom' | |
| + feed 'fabiensanglard' 'https://fabiensanglard.net/rss.xml' | |
| + feed 'pluralistic' 'https://pluralistic.net/feed/' | |
| + feed 'craphound' 'https://craphound.com/feed' | |
| + feed 'koutsie' 'https://k0.tel/feed.xml' | |
| + feed 'labnotes' 'https://labnotes.org/rss/' | |
| + feed 'jeffgeerling' 'https://www.jeffgeerling.com/blog.xml' | |
| + feed 'garfnet' 'https://garfnet.org.uk/cms/feed/' | |
| + feed 'benedikt' 'https://bfloeser.de/index.xml' | |
| + feed 'chromic' 'https://chromic.org/index.xml' | |
| + feed 'dandelion-utilitarian' 'https://dandelion-utilitarian.com/feed.x… | |
| + feed 'wrongthink' 'https://wrongthink.link/posts/index.xml' | |
| + feed 'cheeyeo' 'https://www.cheeyeo.xyz/feed.xml' | |
| + feed 'veronica' 'https://vkc.sh/feed/' | |
| + feed 'writer13' 'https://writer13.neocities.org/rss.xml' | |
| +} | |
| diff --git a/sway/config b/sway/config | |
| @@ -16,9 +16,8 @@ workspace_layout default | |
| font pango: Hack:style=Regular 2 | |
| # application assignment | |
| -for_window [app_id="mpv"] floating enable, sticky enable, resize set 560 280, … | |
| +#for_window [app_id="mpv"] floating enable, sticky enable, resize set 560 280,… | |
| assign [app_id="librewolf"] 2 | |
| -assign [app_id="qutebrowser"] 2 | |
| # misc | |
| xwayland enable | |
| @@ -33,8 +32,8 @@ input * { | |
| # keybinds | |
| bindsym $mod+Space exec footclient | |
| bindsym $mod+p exec $menu | |
| -bindsym $mod+f exec qutebrowser | |
| -bindsym $mod+m exec /home/jay/bin/music | |
| +bindsym $mod+f exec librewolf | |
| +bindsym $mod+m exec /home/jay/bin/music.sh | |
| bindsym $mod+s exec flatpak run com.heroicgameslauncher.hgl | |
| bindsym XF86AudioRaiseVolume exec pamixer -i 5 | |
| diff --git a/waybar/config b/waybar/config | |
| @@ -1,6 +1,5 @@ | |
| { | |
| // general | |
| - "output": "DP-1", | |
| "reload_style_on_change": true, | |
| "layer": "top", | |
| "position": "top", | |
| @@ -15,8 +14,6 @@ | |
| ], | |
| "modules-right": [ | |
| - "custom/newsraft", | |
| - "custom/mail", | |
| "pulseaudio", | |
| "tray", | |
| "clock" |