misc improvements and fixes master
authorIan Kelling <ian@iankelling.org>
Thu, 9 Oct 2025 01:23:33 +0000 (21:23 -0400)
committerIan Kelling <ian@iankelling.org>
Thu, 9 Oct 2025 01:23:33 +0000 (21:23 -0400)
.dataprinter
brc
brc2
ffs
filesystem/usr/local/bin/switch-mail-host
machine_specific/frodo/filesystem/etc/systemd/system/btrbkr4.service
machine_specific/frodo/subdir_files/.config/pipewire/pipewire.conf [deleted file]
myx
subdir_files/.gnupg/gpg.conf

index 09d23f5b52f057d8b83bfc3410f9c5340930eb9a..bec4a8b94132c48ab355b31f5f79b900edd36772 100644 (file)
@@ -1,5 +1,6 @@
 
-multiline = 0
+#multiline = 0
+
 # i like it, but it randomly got mostly stuck on bright blue.
 theme = Solarized
 #colored = 0
diff --git a/brc b/brc
index af9266e284cca3aad820c1c191f23bdcf255a5fd..2fe28800b71bee297ff329e7fced3a7ac3a34ec1 100644 (file)
--- a/brc
+++ b/brc
@@ -1354,14 +1354,11 @@ dfp() {
 # get ipv4 ip from HOST. or if it is already a number, return that
 hostip() {
   local host="$1"
-  case $host in
-    [0-9:])
-      echo "$host"
-      ;;
-    *)
-      getent ahostsv4 "$host" | awk '{ print $1 }' | head -n1
-      ;;
-  esac
+  if [[ $host == *[0-9:]* ]]; then
+    echo "$host"
+  else
+    getent ahostsv4 "$host" | awk '{ print $1 }' | head -n1
+  fi
 }
 
 # dig nicer defaults
@@ -1937,20 +1934,25 @@ gr() {
   grep -iIP --color=auto "$@" || return $?
 }
 # grep recursive
+#
+# Doesn't return 1 on nonmatch because this is meant to be
+# interactive, not in a conditional.
 grr() {
-  # Don't return 1 on nonmatch because this is meant to be
-  # interactive, not in a conditional.
-  if [[ ${#@} == 1 ]]; then
-    grep --exclude-dir='*.emacs.d' --exclude-dir='*.git' -rniIP --color=auto "$@" . || [[ $? == 1 ]]
-  else
-    grep --exclude-dir='*.emacs.d' --exclude-dir='*.git' -rniIP --color=auto "$@" || [[ $? == 1 ]]
-  fi
+  local dir_arg
+  if [[ ${#@} == 1 ]]; then dir_arg=.; fi
+  grep --exclude-dir='*.emacs.d' --exclude-dir='*.git' -rniIP --color=auto "$@" $dir_arg || [[ $? == 1 ]]
 }
 ccomp grep gr grr
 
 # recursive grep
 rg() { grr "$@"; }
-ccomp grep rg
+# copy of grr, add pager
+rgp() {
+  local dir_arg
+  if [[ ${#@} == 1 ]]; then dir_arg=.; fi
+  grep --exclude-dir='*.emacs.d' --exclude-dir='*.git' -rniIP --color=always "$@" $dir_arg | less || [[ $? == 1 ]]
+}
+ccomp grep rg rgp
 
 # recursive grep and find (e for everything). search for files/dirs and
 # lines.
@@ -2031,14 +2033,11 @@ go-github-install() {
   echo targetf: $targetf
   github-release-dl "$@"
   files=(./*)
-  case $file_suffix in
-    *.bz2)
-      m bunzip2 -- ./*
-      ;;
-    *.tar.gz|*.tgz)
-      m tar -vxzf ./*
-      ;;
-  esac
+  if [[ $file_suffix == *.bz2 ]]; then
+    m bunzip2 -- ./*
+  elif [[ $file_suffix == *.tar.gz || $file_suffix == *.tgz ]]; then
+    m tar -vxzf ./*
+  fi
   m rm -f -- "${files[@]}"
   files=(./*)
   # Here we detect and handle 2 cases: either we extracted a single
@@ -2258,7 +2257,7 @@ low() {
     new="${new#"${new%%[[:alnum:]]*}"}" # remove leading/trailing non-alnum
     new="${new%"${new##*[[:alnum:]]}"}"
     # remove bad underscores, like __ and _._
-    new=$(echo $new | sed -r 's/__+/_/g;s/_+([.-])|([.-])_+/\1/g')
+    new=$(echo $new | sed -r 's/__+/_/g;s/_*([.-])_*/\1/g')
     safe_rename "$dir/$f" "$dir/$new" || return 1
   done
   return 0
@@ -4567,7 +4566,13 @@ join-arr() {
   j="${arr[0]}"
   for elt in "${arr[@]:1}"; do
     j+="$sep$elt"
-    done
+  done
+}
+
+# jl = join lines. run, then paste lines, press ctrl-c when done, then
+# all the lines will be joined and stored in $x.
+jl() {
+  x=$(cat)
   }
 
 # * stuff that makes sense to be at the end
diff --git a/brc2 b/brc2
index 64fd0dae4475a0e231ac5f3c7bfccf98b7ce009c..6d28b901fcfb0aca3db396b7b3d43245a9d5177b 100644 (file)
--- a/brc2
+++ b/brc2
@@ -2851,6 +2851,10 @@ mpvgpu() {
 mpvd() {
   mpv --profile=d "$@";
 }
+# mpv profile e. good for videos
+mpe () {
+  mpv --profile=e "$@";
+  }
 mpva() {
   mpv --profile=a "$@";
 }
@@ -3194,7 +3198,7 @@ jc() {
 xc() {
   xclip -r -selection clipboard "$@"
 }
-# echo copy
+# echo copy.  e text to copy | ec
 ec() {
   pee "xclip -r -selection clipboard" cat
 }
@@ -4338,12 +4342,11 @@ if type -P rg &>/dev/null; then
   # -. = search dotfiles
   # -n --no-heading: show files and line numbers together allowing for clicking
   rg() {
-    local path_arg
-    if [[ ${#@} == 1 ]]; then
-      path_arg=.
-    fi
-
-    command rg -. -z --no-messages -Lin --no-heading -M 900 --no-ignore-parent --no-ignore-vcs -g '!.git' -g '!auto-save-list' -g '!.savehist' "$@" $path_arg || return $?
+    command rg -. -z --no-messages -Lin --no-heading -M 900 --no-ignore-parent --no-ignore-vcs -g '!.git' -g '!auto-save-list' -g '!.savehist' "$@"  || return $?
+  }
+  # rgp = rg + pager
+  rgp() {
+    rg --color=always "$@" | less
   }
   #fails if not exist. ignore
   complete -r rg 2>/dev/null ||:
diff --git a/ffs b/ffs
index e23f8ba2d1ee4916dd798e28e0376385f3ab60ac..1c5cd70b2d06d22f113a9353145feb9c2883205d 100755 (executable)
--- a/ffs
+++ b/ffs
@@ -56,7 +56,7 @@ arg is icecast mountpoint suffix, except staff removes suffix.
    quarter: self evident
 -u    Undelayed. Removes 5 second video delay, and about 4 second audio delay.
 -w    do not launch watch of stream
--8  Use vp9 instead of default vp9.
+-8  Use vp8 instead of default vp9.
 
 note: args duplicated in ffp
 
@@ -205,7 +205,7 @@ if ! $local; then
     sleep 4
   fi
 
-  pass=$(sed -n 's/ *<source-password>\([^<]*\).*/\1/p' /p/c/icecast.xml)
+  pass=$(sed -n 's/ *<source-password>\([^<]*\).*/\1/p' /p/c/user-specific/icecast2/icecast.xml)
 fi
 
 xrandr=$(xrandr)
index be1f9dd8c0b3daa5d3645b9f7ec00c77cbaf0d67..fb3212d83b0f62febc6447e8cb43cae1c2d94683 100755 (executable)
@@ -85,7 +85,7 @@ host2_only=false
 force=false
 force_arg=
 pull_reexec=false
-mp_args="-m /o,/a,/q,/qr"
+mp_args="-m /o,/a,/q"
 check_installed=false
 orig_args=("$@")
 if ! temp=$(getopt -l check-installed,force,pull-reexec,help 2afioh "$@"); then
@@ -144,7 +144,7 @@ fi
 if $mail_only; then
   mp_args="-m /o"
 elif $host2_only; then
-  mp_args="-m /a,/q,/qr"
+  mp_args="-m /a,/q"
 fi
 
 
index 54890b42fab43954de0074ce3ee4e4c9e74c9c84..e2bf800526aaf0d7c503e976ee188e915191fe23 100644 (file)
@@ -1,7 +1,7 @@
 [Unit]
-Description=Btrbk to r3
+Description=Btrbk to r4
 After=multi-user.target
 
 [Service]
 Type=oneshot
-ExecStart=/usr/local/bin/sysd-mail-once btrbkr3 btrbk -c /etc/btrbk/r3.conf run
+ExecStart=/usr/local/bin/sysd-mail-once btrbkr4 btrbk -c /etc/btrbk/r4.conf run
diff --git a/machine_specific/frodo/subdir_files/.config/pipewire/pipewire.conf b/machine_specific/frodo/subdir_files/.config/pipewire/pipewire.conf
deleted file mode 100644 (file)
index 2ef7e85..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-# Daemon config file for PipeWire version "1.0.5" #
-#
-# Copy and edit this file in /etc/pipewire for system-wide changes
-# or in ~/.config/pipewire for local changes.
-#
-# It is also possible to place a file with an updated section in
-# /etc/pipewire/pipewire.conf.d/ for system-wide changes or in
-# ~/.config/pipewire/pipewire.conf.d/ for local changes.
-#
-
-context.properties = {
-
-    # iank: adding this made us output at the same sample rate as the audio we were playing, which seems like a good thing. from arch wiki: "PipeWire can also change dynamically the output sample rates supported by your DAC", find them with:
-    # grep -E 'Codec|Audio Output|rates' /proc/asound/card*/codec#*
-    # get currently used rate:
-    # grep rate: /proc/asound/card?/pcm??/sub?/hw_params
-    # or pw-top
-    #
-    #
-    default.clock.allowed-rates = [ 44100 48000 88200 96000 192000 ]
-
-    #default.clock.allowed-rates = [ 48000 ]
-    #default.clock.quantum       = 1024
-    # iank. ran out of time to test this to prevent io stuttering
-    #default.clock.min-quantum   = 1024
-}
-
-# found a rancom config suggestion of a file which is just:
-# context.properties = {
-#     default.clock.rate = 48000
-#     default.clock.quantum = 1024
-#     default.clock.min-quantum = 32
-#     default.clock.max-quantum = 2048
-# }
diff --git a/myx b/myx
index 7c17ef1351176b03bf2691bd6611f850482566ff..9f03a1225cc9b05e39744f75b43f191f3e320b62 100755 (executable)
--- a/myx
+++ b/myx
@@ -224,7 +224,13 @@ done
 
 if [[ ! $secondary_out ]] || grep -A1 disconnected $xf | grep '^[[:space:]]'; then
   # gets rid of leftover secondary
+  if [[ $HOSTNAME != frodo ]]; then
   m xmod --auto
+
+  # new monitor on frodo, I've been having to run this to get the full refresh rate:
+  # xrandr --output DP-0 --mode 3840x2160  --rate 120
+  # testing if this xmod is getting in the way.
+  fi
 fi
 
 if [[ $secondary_out ]] && $restart; then
index 60801d00808c2fe552571bfd49cfaddb523192dd..729d9e92a67d52a293df24f836aa940befbeff27 100644 (file)
@@ -39,10 +39,10 @@ default-key B125F60B7B287FF6A2B7DF8F170AF0E2954295DF
 # DO NOT USE THIS ONE.
 #keyserver hkp://pool.sks-keyservers.net
 
-keyserver hkp://keys.openpgp.org
+#keyserver hkp://keys.openpgp.org
 #keyserver hkp://pgp.mit.edu
 #keyserver hkp://keyserver.pgp.com
-#keyserver hkp://ipv4.pool.sks-keyservers.net
+keyserver hkp://ipv4.pool.sks-keyservers.net
 #keyserver hkp://keys.gnupg.net
 #keyserver hkp://keyserver.ubuntu.com
 #keyserver hkp://keyring.debian.org