mostly fixes
[distro-setup] / brc2
diff --git a/brc2 b/brc2
index d678668326210e9be69c3ab65903a2131806ba7b..491dcada8e562e33990a96b50427ab9cf1af16a2 100644 (file)
--- a/brc2
+++ b/brc2
@@ -507,7 +507,7 @@ lipush() {
   a="-ahviSAXPH --specials --devices --delete --relative --exclude-from=/p/c/li-rsync-excludes"
   ret=0
   for h in li je bk; do
-    m s rsync "$@" $a ${p[@]} /p/c/machine_specific/$h root@$h.b8.nz:/ || ret=$?
+    m s rsync "$@" $a ${p[@]} /p/c/machine_specific/$h root@$h.b8.nz:/
     ## only li is debian11
     #p[0]=/a/opt/emacs-trisuqel10
     #p[1]=/a/opt/emacs-trisquel10-nox
@@ -1758,7 +1758,9 @@ vpncmd() {
 }
 vpnf() {
   sudo -v
-  vpncmd sudo -E -u iank env "PATH=$PATH" abrowser -no-remote -P vpn & r
+  vpncmd sudo -E -u iank env "PATH=$PATH" abrowser -no-remote -P vpn &
+  sleep 5
+  r
 }
 vpn2f() {
   sudo -v
@@ -1917,7 +1919,15 @@ if [[ -e $f ]]; then
   source $f
 fi
 
-
+electrum() {
+  # https://electrum.readthedocs.io/en/latest/tor.html
+  # https://github.com/spesmilo/electrum-docs/issues/129
+  s rsync -ptog --chown bitcoin:bitcoin ~/.Xauthority /var/lib/bitcoind/.Xauthority
+  sudo -u bitcoin DISPLAY=$DISPLAY XAUTHORITY=/var/lib/bitcoind/.Xauthority /a/opt/electrum-4.2.1-x86_64.AppImage -p socks5:localhost:9050
+}
+monero() {
+  sudo -u bitcoin DISPLAY=$DISPLAY XAUTHORITY=/var/lib/bitcoind/.Xauthority /a/opt/monero-gui-v0.17.3.2/monero-wallet-gui
+}
 
 
 reset-konsole() {
@@ -1944,6 +1954,12 @@ scrollbar true
 EOF
 }
 
+# make a page of links found in the files $@. redirect output
+linkhtml() {
+  gr -oh 'https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)' "$@" | \
+    rev | sort -u | rev | sed 's,.*,<a href="\0">\0</a><br\>,'
+}
+
 reset-xscreensaver() {
   # except for spash, i set these by setting gui options in
   # xscreensaver-command -demo