mainly fixes
authorIan Kelling <ian@iankelling.org>
Fri, 13 Feb 2026 22:50:41 +0000 (17:50 -0500)
committerIan Kelling <ian@iankelling.org>
Fri, 13 Feb 2026 23:00:03 +0000 (18:00 -0500)
.mailcap
brc
distro-begin
distro-end
filesystem/usr/local/bin/ikclip [deleted file]
filesystem/usr/local/bin/ssh-askpass-hack
filesystem/usr/share/applications/ikclip.desktop
machine_specific/frodo/filesystem/etc/btrbk/f2.conf [new file with mode: 0644]
machine_specific/frodo/filesystem/etc/systemd/system/btrbkf2.service [new file with mode: 0644]
machine_specific/frodo/filesystem/etc/systemd/system/btrbkf2.timer [new file with mode: 0644]
mymimes

index e0e4a99931ceacd16c6e7011afcc99e0223aad33..91511267ac60e11d2bc9cda8488609e971bc8542 100644 (file)
--- a/.mailcap
+++ b/.mailcap
@@ -1,2 +1,2 @@
-# google mailcap for more info.
 text/plain; g '%s'; edit=g '%s'; compose=g '%s'; needsterminal
+inode/directory; ikclip %s;
diff --git a/brc b/brc
index 0b5b6f7249dd123e4c73195b6ccf0fed770c0434..72f1e96ba9fbf7e6453171b250c51bec961b717e 100644 (file)
--- a/brc
+++ b/brc
@@ -348,7 +348,6 @@ mysrc /a/c/fsf-script-lib
 mysrc /a/bin/small-misc-bash/ll-function
 mysrc /a/bin/distro-functions/src/package-manager-abstractions
 mysrc /a/bin/fai/fai/config/distro-install-common/bash-misc-funcs
-mysrc /a/c/fzf-brc
 
 
 
@@ -1735,6 +1734,14 @@ faf() {
        -o -name .undo-tree-history -prune \) \! -type d 2>/dev/null
 }
 
+# like faf, but sort by modification time. like lt()
+faft() {
+  find "$@" -not \( -name .svn -prune -o -name .git -prune \
+       -o -name .hg -prune -o -name .editor-backups -prune \
+       -o -name .undo-tree-history -prune \) \! -type d \
+       -printf "%T@ %P\n" | sort -n | cut -d' ' -f2-
+}
+
 # ffmpeg concat files.
 # usage ffconcat FILES_TO_CONCAT OUTPUT_FILE
 ffconcat() {
@@ -3094,19 +3101,29 @@ slowdo() {
 
 # sets $host_type, and maybe some related vars: $pre_synced, $extra_info
 _sl-get-host-type() {
-  local tmp tmp2 testbool testcmd
-  local -a tmpa
+  local tmp tmp2 testbool testcmd
+
   if [[ $sl_local_test_cmd ]]; then
     host_type=$($sl_local_test_cmd "$remote")
+    if [[ $host_type == skip ]]; then return; fi
   fi
-  if [[ $host_type ]]; then return; fi
 
-  tmpa=($SL_INFO_DIR/??????????-????-"$remote")
-  sshinfo=${tmpa[0]}
+  sshinfo_files=($SL_INFO_DIR/??????????-????-"$remote")
+  # there should only be one, but just in case, remove all but 1.
+  if (( ${#sshinfo_files[@]} >= 2 )); then
+    mq rm ${sshinfo_files[@]::${#sshinfo_files[@]}-1}
+    sshinfo_files=($SL_INFO_DIR/??????????-????-"$remote")
+  fi
+  sshinfo="${sshinfo_files[0]}"
+
+  # if $verbose; then e "sshinfo: '$sshinfo'"; fi # debug
   if [[ -e $sshinfo ]]; then
-    tmp=${sshinfo[0]##*/}
+    tmp=${sshinfo##*/}
     tmp2=${tmp:11} # skip 11 chars
-    host_type=${tmp2%%-*}
+    if [[ ! $host_type ]]; then
+      host_type=${tmp2%%-*}
+    fi
+    if [[ $host_type == skip ]]; then return; fi
     extra_info=$(cat $sshinfo)
 
     ### block to see if past sync is up to date
@@ -3181,10 +3198,11 @@ _sl-get-host-type() {
 
 # SL_TEST_CMD / --sl-test-cmd CMD: Env var or cli option. If set, we run
 # this string on the remote host the first time sl is run (or if we run
-# slr). Its standard out is passed to SL_TEST_HOOK which gets run
-# locally.  It is meant to be used to vary the files synced depending on
-# the remote host. For example, export SL_TEST_CMD=". /etc/os-release ;
-# echo \${VERSION//[^a-zA-Z0-9]/}". cli option overrides env var.
+# slr) and there is no SL_LOCAL_TEST_CMD. Its standard out is passed to
+# SL_TEST_HOOK which gets run locally.  It is meant to be used to vary
+# the files synced depending on the remote host. For example, export
+# SL_TEST_CMD=". /etc/os-release ; echo \${VERSION//[^a-zA-Z0-9]/}". cli
+# option overrides env var. The internal var is "extra_info".
 
 # SL_TEST_HOOK / --sl-test-hook HOOK: Env var or cli option. See SL_TEST_CMD
 # above. It is run unquoted (with expansion). This can set $SL_FILES_DIR
@@ -3226,7 +3244,7 @@ sl() {
   local verbose now args remote sshinfo tmp host_type info_sec force_rsync
   local sync_dirname extra_info files_sec sl_test_cmd sl_test_hook pre_synced
   local sl_rsync_cmd sl_test_cmd sl_test_hook sl_local_test_cmd
-  local -a args
+  local -a args sshinfo_files
 
   args=($SL_SSH_ARGS)
 
@@ -3286,6 +3304,7 @@ sl() {
     esac
     shift
   done
+  # verbose=true # debug
 
   while [[ $1 ]]; do
     case "$1" in
@@ -3327,7 +3346,7 @@ sl() {
   pre_synced=false
   _sl-get-host-type
 
-  if [[ $sl_test_hook ]]; then
+  if [[ $sl_test_hook && $extra_info ]]; then
     mq RSYNC_RSH="ssh ${args[*]}" $sl_test_hook "$extra_info" "$remote"
   fi
 
@@ -3339,11 +3358,14 @@ sl() {
 
   if [[ $host_type == sync ]] && ! $pre_synced; then
     m RSYNC_RSH="ssh ${args[*]}" $sl_rsync_cmd -rptL --delete $SL_FILES_DIR "$remote":
-
+    mq rm-maybe "$sshinfo"
     sshinfo=$SL_INFO_DIR/$EPOCHSECONDS-$host_type-"$remote"
     [[ -e $SL_INFO_DIR ]] || mkdir -p $SL_INFO_DIR
     printf "%s\n" "$extra_info" >$sshinfo
     chmod 666 $sshinfo
+    if $verbose; then
+      m ls -la $sshinfo
+    fi
   fi
 
   if [[ $host_type == sync ]]; then
@@ -4742,6 +4764,9 @@ if ! type -p fzf &>/dev/null; then
   fi
 fi
 
+# in fzf-brc, _fzf_handle_dynamic_completion is returning 1.
+err_catch_ignore+=( '*/fzf-brc' )
+mysrc /a/c/fzf-brc
 
 # ensure no bad programs appending to this file will have an affect
 return 0
index 9e7e01f798b61cdc0877a2447dbc63454cb47704..0bc240cb967eedb3ede834f0d1038b1f78e28598 100755 (executable)
@@ -597,7 +597,7 @@ mnt-fstab() {
 case $HOSTNAME in
   $d_host)
     sudo /a/exe/teeu /etc/fstab <<'EOF'
-/dev/mapper/crypt_dev_ata-Samsung_SSD_870_QVO_8TB_S5VUNG0N900656V-part6  /d  btrfs  nofail,x-systemd.device-timeout=30s,x-systemd.mount-timeout=30s,noatime,compress=zstd,subvol=d  0 0
+/mnt/rbackup/d  /d  none  bind  0 0
 /d/m /i  none  bind,compress=zstd  0 0
 EOF
     if ! mountpoint /d &>/dev/null; then
index 85d1a652224540121c49ffe741687908c5097dcf..cad96224d805445271f9cba09ae0bf19945be5ff 100755 (executable)
@@ -1258,12 +1258,6 @@ if mountpoint /p &>/dev/null; then
   # this guesses at the appropriate directory, adjust if needed
   perldir=(/usr/lib/x86_64-linux-gnu/perl/5.*)
   m sudo ln -sf ../../../perl/5.18.2/SPD/ ${perldir[0]}
-  # newer distro had gpg2 as default, older one, flidas, need to make it that way
-  gpgpath=$(which gpg2) ||:
-  if [[ $gpgpath ]]; then
-    sudo mkdir -p /usr/local/spdhackfix
-    s lnf -T $gpgpath /usr/local/spdhackfix/gpg
-  fi
 fi
 ### end spd install
 
diff --git a/filesystem/usr/local/bin/ikclip b/filesystem/usr/local/bin/ikclip
deleted file mode 100755 (executable)
index 50d428d..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-# I, Ian Kelling, follow the GNU license recommendations at
-# https://www.gnu.org/licenses/license-recommendations.en.html. They
-# recommend that small programs, < 300 lines, be licensed under the
-# Apache License 2.0. This file contains or is part of one or more small
-# programs. If a small program grows beyond 300 lines, I plan to change
-# to a recommended GPL license.
-
-# Copyright 2024 Ian Kelling
-
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-
-#     http://www.apache.org/licenses/LICENSE-2.0
-
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-printf "%s" "$*" >> /tmp/ikclip.log
-# both!
-printf "%s" "$*" | xclip
-printf "%s" "$*" | xclip -selection clipboard
index d6554bc0bba6d4b5ec99837fbb8067339efdeb73..568cd470fec3fad02268f4eb6a565cba370b07fa 100755 (executable)
@@ -22,6 +22,9 @@
 
 if [[ ! $DISPLAY ]]; then
   if [[ $RSYNC_SSH_DISPLAY_HACK ]]; then
+    if [[ $VERBOSE && $VERBOSE != false ]]; then
+      echo export "DISPLAY=$RSYNC_SSH_DISPLAY_HACK"
+    fi
     export "DISPLAY=$RSYNC_SSH_DISPLAY_HACK"
   fi
 fi
index dfca0b93324c65971e9945499d2f46e247f1b0be..7c65411a069e99728199532d64f22903625523a7 100644 (file)
@@ -1,12 +1,12 @@
 #!/usr/bin/env xdg-open
-# copied from emacsmail and gwenview
 [Desktop Entry]
 Version=1.0
 Type=Application
 Terminal=false
 Name[en]=ikclip
-Exec=/usr/local/bin/ikclip %u
+Exec=/usr/local/bin/ikclip %U
 Name=ikclip
 Categories=Office;Network;Email;Graphics;Viewer;Photography;
 MimeType=inode/directory;image/avif;image/gif;image/heif;image/jpeg;image/jxl;image/png;image/bmp;image/x-eps;image/x-icns;image/x-ico;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-xbitmap;image/x-xpixmap;image/tiff;image/x-psd;image/x-webp;image/webp;image/x-tga;image/x-xcf;application/x-krita;image/x-kde-raw;image/x-canon-cr2;image/x-canon-crw;image/x-kodak-dcr;image/x-adobe-dng;image/x-kodak-k25;image/x-kodak-kdc;image/x-minolta-mrw;image/x-nikon-nef;image/x-olympus-orf;image/x-pentax-pef;image/x-fuji-raf;image/x-panasonic-rw;image/x-sony-sr2;image/x-sony-srf;image/x-sigma-x3f;image/x-sony-arw;image/x-panasonic-rw2
 NoDisplay=false
+InitialPreference=40
diff --git a/machine_specific/frodo/filesystem/etc/btrbk/f2.conf b/machine_specific/frodo/filesystem/etc/btrbk/f2.conf
new file mode 100644 (file)
index 0000000..ba81c58
--- /dev/null
@@ -0,0 +1,18 @@
+transaction_syslog local7
+
+lockfile                   /var/lock/btrbk-f2.lock
+
+timestamp_format long-iso
+
+snapshot_create onchange
+
+snapshot_preserve 18h 14d 8w 12m
+snapshot_preserve_min 2d
+snapshot_dir btrbk
+
+target_preserve 18h 14d 8w 12m
+target_preserve_min 2d
+
+rate_limit no
+volume /mnt/f2
+subvolume ro2
diff --git a/machine_specific/frodo/filesystem/etc/systemd/system/btrbkf2.service b/machine_specific/frodo/filesystem/etc/systemd/system/btrbkf2.service
new file mode 100644 (file)
index 0000000..894a35c
--- /dev/null
@@ -0,0 +1,7 @@
+[Unit]
+Description=Btrbk to f2
+After=multi-user.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/local/bin/sysd-mail-once btrbkf2 btrbk -c /etc/btrbk/f2.conf run
diff --git a/machine_specific/frodo/filesystem/etc/systemd/system/btrbkf2.timer b/machine_specific/frodo/filesystem/etc/systemd/system/btrbkf2.timer
new file mode 100644 (file)
index 0000000..d026fbc
--- /dev/null
@@ -0,0 +1,8 @@
+[Unit]
+Description=Btrbk f2 timer
+
+[Timer]
+OnCalendar=*-*-* 13:00:00 America/New_York
+
+[Install]
+WantedBy=timers.target
diff --git a/mymimes b/mymimes
index 760b56c59fece0de9192496b6b2b03a0f8b597de..af06e433284303f8e1ac4321a19cea359dce8ede 100755 (executable)
--- a/mymimes
+++ b/mymimes
@@ -44,8 +44,5 @@ echo x-scheme-handler/mailto=emacsmail.desktop >>/etc/xdg/defaults.list
 # https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
 cp /etc/xdg/defaults.list /etc/xdg/mimeapps.list
 
-for f in /usr/share/applications/!(defaults).list; do
-  cp /etc/xdg/defaults.list /etc/xdg/${f##*/}
-done
 
 update-desktop-database