commit 46d972f987a3cb197b6761f415324367c9c93af5
parent ac4e93a6ab6935397e4e18ebc0f87897e9062099
Author: Matthew Carlson <matt@mattcarlson.org>
Date: Wed, 24 Aug 2022 00:18:24 -0400
now using firefox; small changes here and there
Diffstat:
13 files changed, 165 insertions(+), 14 deletions(-)
diff --git a/.config/firefox/user-overrides.js b/.config/firefox/user-overrides.js
@@ -0,0 +1,132 @@
+// use quad9
+user_pref("network.trr.mode", 3);
+user_pref("network.trr.default_provider_uri", "https://dns.quad9.net/dns-query");
+user_pref("network.trr.uri", "https://dns.quad9.net/dns-query");
+user_pref("network.trr.custom_uri", "https://dns.quad9.net/dns-query");
+user_pref("network.trr.bootstrapAddress", "9.9.9.9");
+
+// keep ipv6 enabled
+user_pref("network.dns.disableIPv6", false);
+
+// enable search engines
+user_pref("keyword.enabled", true);
+
+// disk caching; placebo(?)
+user_pref("browser.cache.disk.enable", true);
+
+// enable favicons
+user_pref("browser.shell.shortcutFavicons", true);
+
+// don't use firefox's password manager; it is garbage
+user_pref("signon.rememberSignons", false);
+user_pref("signon.generation.enabled", false);
+user_pref("signon.management.page.breach-alerts.enabled", false);
+
+// pocket is proprietary garbage; get rid of it
+user_pref("extensions.pocket.enabled", false);
+
+// disable mozilla account
+user_pref("identity.fxaccounts.enabled", false);
+
+// disable reader view
+user_pref("reader.parse-on-load.enabled", false);
+
+// disable container tabs
+user_pref("privacy.userContext.enabled", false);
+user_pref("privacy.userContext.ui.enabled", false);
+
+// no page close confirmation
+user_pref("dom.disable_beforeunload", true);
+
+// set downloads dir
+user_pref("browser.download.folderList", 2);
+user_pref("browser.download.dir", "/home/mc/dl");
+
+// this doesn't do anything
+user_pref("privacy.donottrackheader.enabled", true);
+
+// colors
+user_pref("browser.display.foreground_color", "#ffffff");
+user_pref("browser.display.background_color", "#000000");
+
+// https://wiki.mozilla.org/Firefox/Activity_Stream
+user_pref("browser.newtabpage.activity-stream.feeds.topsites", false);
+user_pref("browser.newtabpage.activity-stream.section.highlights.includeBookmarks", false);
+user_pref("browser.newtabpage.activity-stream.section.highlights.includeDownloads", false);
+user_pref("browser.newtabpage.activity-stream.section.highlights.includeVisited", false);
+user_pref("browser.newtabpage.activity-stream.showSearch", false);
+
+// disable safe browsing; it apparently phones home to google
+user_pref("browser.safebrowsing.downloads.enabled", false);
+user_pref("browser.safebrowsing.downloads.remote.block_potentially_unwanted", false);
+user_pref("browser.safebrowsing.downloads.remote.block_uncommon", false);
+user_pref("browser.safebrowsing.malware.enabled", false);
+user_pref("browser.safebrowsing.phishing.enabled", false);
+
+// do not underline links
+user_pref("browser.underline_anchors", false);
+
+// use ddg as default search engine, the 'best' of the default search engines
+// EDIT: doesn't work
+user_pref("browser.urlbar.placeholderName", "DuckDuckGo");
+
+// no suggestions in address bar
+user_pref("browser.urlbar.suggest.bookmark", false);
+user_pref("browser.urlbar.suggest.engines", false);
+user_pref("browser.urlbar.suggest.history", false);
+user_pref("browser.urlbar.suggest.openpage", false);
+user_pref("browser.urlbar.suggest.topsites", false);
+user_pref("browser.urlbar.showSearchSuggestionsFirst", false);
+
+// do not warn on quit
+user_pref("browser.warnOnQuitShortcut", false);
+
+// hide dictionary
+user_pref("extensions.ui.dictionary.hidden", true);
+user_pref("extensions.ui.locale.hidden", true);
+user_pref("extensions.ui.sitepermission.hidden", true);
+
+// fonts
+user_pref("font.minimum-size.x-western", 16);
+user_pref("font.name.monospace.x-western", "monospace");
+user_pref("font.name.sans-serif.x-western", "sans-serif");
+user_pref("font.name.serif.x-western", "serif");
+user_pref("font.size.monospace.x-western", 16);
+
+// english is only accepted language
+user_pref("intl.accept_languages", "en");
+
+// don't want spell checker
+user_pref("layout.spellcheckDefault", 0);
+
+// handle pdf
+user_pref("pdfjs.enabledCache.state", false);
+
+// block permissions
+user_pref("permissions.default.camera", 2);
+user_pref("permissions.default.desktop-notification", 2);
+user_pref("permissions.default.geo", 2);
+user_pref("permissions.default.microphone", 2);
+user_pref("permissions.default.xr", 2);
+user_pref("media.autoplay.default", 5);
+user_pref("media.hardwaremediakeys.enabled", false);
+
+// disable buttons
+user_pref("pref.browser.language.disable_button.remove", false);
+user_pref("pref.downloads.disable_button.edit_actions", false);
+user_pref("pref.privacy.disable_button.cookie_exceptions", false);
+user_pref("pref.privacy.disable_button.tracking_protection_exceptions", false);
+user_pref("pref.privacy.disable_button.view_passwords_exceptions", false);
+
+// offline website data
+user_pref("privacy.cpd.offlineApps", true);
+
+// what to sanitize
+user_pref("privacy.sanitize.pending", "[{\"id\":\"newtab-container\",\"itemsToClear\":[],\"options\":{}},{\"id\":\"shutdown\",\"itemsToClear\":[\"cache\",\"offlineApps\",\"history\",\"formdata\",\"downloads\",\"sessions\"],\"options\":{}}]");
+user_pref("privacy.clearOnShutdown.offlineApps", true);
+
+// request english for web sites
+user_pref("privacy.spoof_english", 2);
+
+// use system theme by default
+user_pref("layout.css.prefers-color-scheme.content-override", 2);
diff --git a/.config/git/config b/.config/git/config
@@ -1,6 +1,6 @@
[user]
name = Matthew Carlson
- email = matt@mcarlson.xyz
+ email = matt@mattcarlson.org
signingkey = 9CC4E75365C16465FFE752C94DDBF97211D4EA31
[commit]
gpgsign = true
diff --git a/.config/newsboat/config b/.config/newsboat/config
@@ -59,7 +59,7 @@ download-timeout 60
feedlist-format "%?T?┃ %-3i %n %t %u&┣━ %t %>━?"
feedlist-title-format "%N %V - Feeds"
goto-next-feed no
-highlight article "^(Feed|Title|Author|Date|Link(s)?):.*$" green default bold
+highlight article "^(Feed|Title|Author|Date|Podcast Download Url|Link(s)?):.*$" green default bold
highlight article "^\[[0-9]+\]:\ .*\ [(].+[)]$" green default bold
highlight article "(\\w+)(\\.|_)?(\\w*)@(\\w+)(\\.(\\w+))+" green default bold
highlight article "((http|https)://)(www.)?[a-zA-Z0-9@:%._\\+~#?&//=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%._\\+~#?&//=]*)" green default bold
diff --git a/.config/sh/profile b/.config/sh/profile
@@ -11,7 +11,7 @@ export WM='dwm'
export BAR='dwmblocks'
export MENU='dmenu_run -c -l 10'
export LOCKER='slock'
-export BROWSER='brave'
+export BROWSER='firefox'
export TERMINAL='st'
export FILE_VIEWER='fff'
export EDITOR='vim'
diff --git a/.config/transmission-daemon/settings.json b/.config/transmission-daemon/settings.json
@@ -26,7 +26,7 @@
"peer-id-ttl-hours": 0,
"peer-limit-global": 65535,
"peer-limit-per-torrent": 65535,
- "peer-port": 61619,
+ "peer-port": 58631,
"peer-port-random-high": 65535,
"peer-port-random-low": 49152,
"peer-port-random-on-start": true,
diff --git a/.config/user-dirs.dirs b/.config/user-dirs.dirs
@@ -0,0 +1,2 @@
+XDG_DESKTOP_DIR="$HOME/"
+XDG_DOWNLOAD_DIR="$HOME/dl/"
diff --git a/.config/x/xprofile b/.config/x/xprofile
@@ -2,7 +2,7 @@
#
# xprofile
-autorandr -c
+autorandr -c external
"${HOME}/.local/bin/color.sh" -s # picom is compositor; touch blank config file to make picom like xcompmgr
xrdb "${XDG_CONFIG_HOME:-${HOME}/.config/}/x/xresources"
"${HOME}/.local/bin/lock.sh" &
diff --git a/.local/bin/backup.sh b/.local/bin/backup.sh
@@ -10,7 +10,7 @@ main() {
if df | grep -q "${BACKUP_DIR}"; then
[ ! -e "${LOG}" ] && touch "${LOG}"
# shellcheck disable=SC3009
- rsync -aAXHv --delete --exclude={"/*bin","/dev/","/lib*","/lost+found/","/mnt/","/opt/","/proc/","/root/","/run/","/srv/","/sys/","/tmp/","/usr/","/var/","/*.wants/"} / "${BACKUP_DIR}"
+ rsync -aAXHv --delete --exclude={"/*bin","/dev/","/lib*","/lost+found/","/mnt/","/opt/","/proc/","/root/","/run/","/srv/","/sys/","/tmp/","/usr/","/var/","/*.wants/"} --exclude="media/" / "${BACKUP_DIR}"
printf '%s\n' "${stamp} - System backup complete." >> "${LOG}"
else printf '%s\n' "${stamp} - ${BACKUP_DIR} is not a mount point. Not backing up system." >> "${LOG}"
fi
diff --git a/.local/bin/bar/rss.sh b/.local/bin/bar/rss.sh
@@ -5,27 +5,31 @@
ICON=''
GET_ICON=''
TMP='/tmp/get-rss'
+RSS="${XDG_CACHE_HOME:-${HOME}/.cache/}/dots/bar/rss"
bar() {
# is reloading
- [ -f "${TMP}" ] && cat "${TMP}" && return
+ [ -f "${TMP}" ] && cat "${TMP}" && exit 0
# a decent way of finding out if prog is open without pgrep
# TODO: implement this in other scripts where ps -ef is used
if ps -ef | grep "${RSS_READER}" | tr -s ' ' | cut -f8- -d ' ' | grep -qx "${RSS_READER}"; then
printf '%s\n' "${ICON}"
else
+ # print cache if newsboat is reloading
+ newsboat -x print-unread >/dev/null
+ [ "${?}" -eq 1 ] && printf '%s\n' "${ICON} $(grep '^[0-9][0-9]*$' "${RSS}")" && exit 0
+
# print unread articles
unread="$(newsboat -x print-unread | awk '{print $1}')"
+ printf '%s\n' "${unread}" > "${RSS}"
printf '%s\n' "${ICON} ${unread}"
fi
}
get_rss() {
printf '%s\n' "${GET_ICON}" > "${TMP}"
- newsboat -x reload
- # delay to ensure reload icon always shows
- sleep 1
+ newsboat -x reload >/dev/null
rm -f "${TMP}"
}
diff --git a/.local/bin/compile.sh b/.local/bin/compile.sh
@@ -49,11 +49,11 @@ main() {
'java') javac "${file}" && java "${file}" ;;
'py') python "${file}" ;;
'sh') sh "${file}" ;;
- 'tex') pdflatex --output-directory="${dir}" "${base}"
+ 'tex') xelatex --output-directory="${dir}" "${base}"
if grep -iq 'addbibresource' "${file}"; then
biber --input-directory "${dir}" "${base}"
fi
- pdflatex --output-directory="${dir}" "${base}"
+ xelatex --output-directory="${dir}" "${base}"
# remove annoying files generated by latex
for f in "${base}".*; do
case "${f##*.}" in
diff --git a/.local/bin/pass.sh b/.local/bin/pass.sh
@@ -26,9 +26,15 @@ main() {
i=$((i+1))
done
- if ! site="$(printf '%s\n' "${sites}" | dmenu -c -l 10)"; then break; fi
+ site="$(printf '%s\n' "${sites}" | dmenu -c -l 10)"
+ [ -z "${site}" ] && break
+ if ! printf '%s\n' "${sites}" | grep -iqx "${site}"; then
+ unset sites
+ continue
+ fi
credentials="$(gpg -dq "${CREDENTIALS_DIR}"/"${site}".gpg)"
+ [ -z "${credentials}" ] && unset sites && continue
credential_types="$(printf '%s\n' "${credentials}" | awk -F ':' '{ print $1 }')"
@@ -51,6 +57,7 @@ main() {
printf '%s\n' "${credential_options}" ))"
if ! credential_option="$(printf '%s\n' "${credential_options}" | dmenu -c -l 10 -p 'Credentials')"; then
+ unset sites
unset credential_options
continue
fi
diff --git a/.local/bin/vultr.sh b/.local/bin/vultr.sh
@@ -10,7 +10,7 @@ get_ids() { awk -F ',' '{ for (i = 1; i <= NF; i++) if ($i ~ /"id"/) print $i }'
# DO NOT SHARE THIS
VULTR_API_KEY='RETRACTED'
-INSTANCE='mcarlson.xyz'
+INSTANCE='mattcarlson.org'
INSTANCE_ID="$(curl 'https://api.vultr.com/v2/instances' \
-X GET \
diff --git a/.local/bin/wp.sh b/.local/bin/wp.sh
@@ -105,6 +105,12 @@ theme() {
# reload xresources
xrdb "${XRESOURCES}"
+ # firefox; python-pywalfox and firefox plugin are required
+ # palette and theme templates have to be set up in firefox itself
+ # see https://github.com/frewacom/pywalfox
+ pywalfox dark
+ pywalfox update
+
# reload all instances of term
kill -s USR1 $(ps -ef | grep -i "\<${TERMINAL}\>" | grep -v '\<grep\>' | awk '{ printf "%s ", $2 }')