minor improvements
authorIan Kelling <ian@iankelling.org>
Mon, 11 Oct 2021 23:51:45 +0000 (19:51 -0400)
committerIan Kelling <ian@iankelling.org>
Mon, 11 Oct 2021 23:51:53 +0000 (19:51 -0400)
brc2
btrfsmaint
check-stale-alerts
distro-end
i3-sway/i3.conf
mail-setup
pkgs
subdir_files/.config/i3/config
subdir_files/.config/mpv/input.conf [new file with mode: 0644]
subdir_files/sieve/lists.sieve

diff --git a/brc2 b/brc2
index 070fb402f538096f689a7e736574a7a5a82127b1..9dab4463518984bea29c6c6cf05aea9e28a2f968 100644 (file)
--- a/brc2
+++ b/brc2
@@ -1060,6 +1060,7 @@ mp() {
   done
 }
 
+# these might need a mu index or something added.
 mbenable() {
   local mb=$1
   dst=/m/4e/$mb
@@ -1067,7 +1068,6 @@ mbenable() {
   [[ -e $src ]] || { echo "src:$src does not exist"; return 1; }
   m mv -T $src $dst
   m ln -s -T $dst $src
-  mu index --maildir=/m/4e
 }
 mb2enable() {
   local mb
@@ -1082,7 +1082,6 @@ mb2enable() {
     m mv -T $src $dst
     m ln -sf -T $dst $link
   done
-  #mu index --maildir=/m/4e
 }
 mbdisable() {
   local mb=$1
index c1e8d06047c111a200002bd13ff78f0525e1f909..070b50185b4213270713a0685530e3ac89145f02 100755 (executable)
@@ -11,12 +11,13 @@ trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
 # Man page says we could also use a range, i suppose it would be
 # logical to use a pattern like 5..10 10..20,
 # but I don't know if this would help us at all.
-dusage="1 5 10 20 30 40 50"
-musage="1 5 10 20 30"
+dusage="5 10"
+musage="5"
 
 e() { echo "cron: $*"; "$@"; }
 
 check-idle() {
+  type -p xprintidle &>/dev/null || return 0
   export DISPLAY=:0
   # a hours, a movie could run that long.
   idle_limit=$((1000 * 60 * 60 * 2))
@@ -104,16 +105,16 @@ main() {
     # e df -H $mnt
     if btrfs filesystem df $mnt | grep -q "Data+Metadata"; then
       for usage in $dusage; do
-        e btrfs balance start -dusage=$usage -musage=$usage $mnt
+        e ionice -c 3 btrfs balance start -dusage=$usage -musage=$usage $mnt
       done
     else
-      e btrfs balance start -dusage=0 $mnt
+      e ionice -c 3 btrfs balance start -dusage=0 $mnt
       for usage in $dusage; do
-        e btrfs balance start -dusage=$usage $mnt
+        e ionice -c 3 btrfs balance start -dusage=$usage $mnt
       done
-      e btrfs balance start -musage=0 $mnt
+      e ionice -c 3 btrfs balance start -musage=0 $mnt
       for usage in $musage; do
-        e btrfs balance start -musage=$usage $mnt
+        e ionice -c 3 btrfs balance start -musage=$usage $mnt
       done
     fi
     # e btrfs filesystem df $mnt
@@ -133,7 +134,8 @@ main() {
         continue
       fi
     fi
-    e btrfs scrub start -Bd $mnt
+    # -c 2 -n 4 is from btrfsmaintenance, does ionice
+    e btrfs scrub start -Bd -c 2 -n 4 $mnt
   done
 }
 
index 1d8f70fd9383a00be83d75839c1980c99d9d27e5..af7d4c74ed5dfaa673bfe01fe86d0a26aa52f9b6 100755 (executable)
@@ -12,7 +12,7 @@ if [[ $out ]]; then
   echo HOSTNAME: $HOSTNAME
   printf "%s\n" "$out"
 fi
-out=$(ssh bk.b8.nz find /m/md/bounces/new /var/local/cron-errors /home/iank/cron-errors /sysd-mail-once-state -type f -ctime +1v )
+out=$(ssh bk.b8.nz find /m/md/bounces/new /var/local/cron-errors /home/iank/cron-errors /sysd-mail-once-state -type f -ctime +1 )
 if [[ $out ]]; then
   echo bk.b8.nz:
   printf "%s\n" "$out"
index db84160b16b345ff40717008c079c41064e087f1..3471fc21a8805c494b5464ab7601e8787c6afd15 100755 (executable)
@@ -338,9 +338,13 @@ EOF
   nabia|etiona)
     # for ziva
     #p install --no-install-recommends minetest/buster libleveldb1d/buster libncursesw6/buster libtinfo6/buster
-    f=/etc/apt/sources.list.d/buster.list
-    t=$(mktemp)
-    cat >$t <<EOF
+    doupdate=false
+    for n in buster bullseye; do
+      f=/etc/apt/sources.list.d/$n.list
+      t=$(mktemp)
+      case $n in
+        buster)
+          cat >$t <<'EOF'
 deb http://http.us.debian.org/debian buster main
 deb-src http://http.us.debian.org/debian buster main
 
@@ -353,17 +357,42 @@ deb-src http://http.us.debian.org/debian buster-updates main
 deb http://http.debian.net/debian buster-backports main
 deb-src http://http.debian.net/debian buster-backports main
 EOF
-    if ! diff -q $t $f; then
+          ;;
+        bullseye)
+          cat >$t <<'EOF'
+EOF
+          cat >$t <<EOF
+deb http://deb.debian.org/debian bullseye main
+deb-src http://deb.debian.org/debian bullseye main
+
+deb http://deb.debian.org/debian-security/ bullseye-security main
+deb-src http://deb.debian.org/debian-security/ bullseye-security main
+
+deb http://deb.debian.org/debian bullseye-updates main
+deb-src http://deb.debian.org/debian bullseye-updates main
+
+deb http://http.debian.net/debian bullseye-backports main
+deb-src http://http.debian.net/debian bullseye-backports main
+EOF
+          ;;
+      esac
+
+      if ! diff -q $t $f; then
+        doupdate=true
+        s cp $t $f
+        s chmod 644 $f
+      fi
+    done
+    if $doupdate; then
       curl -s https://ftp-master.debian.org/keys/archive-key-10-security.asc | sudo apt-key add -
       curl -s https://ftp-master.debian.org/keys/archive-key-10.asc | sudo apt-key add -
-      s cp $t $f
-      s chmod 644 $f
       p update
     fi
-    if [[ ! -e /usr/share/debootstrap/scripts/buster ]]; then
+
+    if [[ ! -e /usr/share/debootstrap/scripts/bullseye ]]; then
       t=$(mktemp -d)
       cd $t
-      m aptitude download debootstrap/buster
+      m aptitude download debootstrap/bullseye
       m ex ./*
       sudo cp ./usr/share/debootstrap/scripts/* /usr/share/debootstrap/scripts
     fi
index 45a7c92dc00afd86655fc309906b1d49fb432174..7b9dff31a053c46911969223b3b473fe2334b925 100644 (file)
@@ -1,5 +1,5 @@
 # exit i3 (logs you out of your X session)
-bindsym $mod+Shift+Tilde exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
+bindsym $mod+Shift+o exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
 
 bindsym $mod+Shift+p restart
 
index 7aa74e79549c788be4c3cc454e5bf36e479a54e9..57d5753ee9e869569f6a9d2f262d0504e9732755 100755 (executable)
@@ -1873,6 +1873,8 @@ EOF
 fi
 EOFOUTER
 
+    mkdir -p /var/www/cron-errors
+    chown www-data.www-data /var/www/cron-errors
     i /etc/cron.d/$ncbase <<EOF
 PATH=/sbin:/usr/sbin:/usr/bin:/bin:/usr/local/bin
 SHELL=/bin/bash
diff --git a/pkgs b/pkgs
index 20bc08273457588bbd19c9f0851c05109eefeb43..95bf2870c4cf1aae9dfbf8ec3f6ae8058854396e 100644 (file)
--- a/pkgs
+++ b/pkgs
@@ -86,6 +86,7 @@ p3=(
   copyq
   cpulimit
   cron
+  cvs
   debian-archive-keyring
   debug-me
   debootstrap
index 0178368591d4c6502299798554be6ed7f5e84699..759310f311a01978d33a19823709a7cd28c373e4 100644 (file)
@@ -106,7 +106,7 @@ bindsym $mod+End exec /a/opt/clipster/clipster -sp
 # file:///usr/share/doc/i3-wm/userguide.html#_border_style_for_new_windows
 new_window none
 # exit i3 (logs you out of your X session)
-bindsym $mod+Shift+Tilde exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
+bindsym $mod+Shift+o exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
 
 bindsym $mod+Shift+p restart
 
diff --git a/subdir_files/.config/mpv/input.conf b/subdir_files/.config/mpv/input.conf
new file mode 100644 (file)
index 0000000..fc26303
--- /dev/null
@@ -0,0 +1 @@
+a cycle_values video-rotate "90" "180" "270" "0"
index 0e443079f85409cf621762cbe3ab96868a45c130..1d1be2032aa5508f0eeb4f25251aa66927ee2c18 100644 (file)
@@ -67,7 +67,7 @@ if anyof (
   header :contains "list-id" "<xapian-devel.lists.xapian.org>",
   header :contains "list-id" "<kdeconnect.kde.org>",
   header :contains "list-id" "<mu-discuss.googlegroups.com>",
-  header :contains "list-id" "<<devel.mediagoblin.org>",
+  header :contains "list-id" "<devel.mediagoblin.org>",
   header :contains "list-id" "<maru-os.googlegroups.com>",
   header :contains "list-id" "<listhelper-moderate.nongnu.org>",
   header :contains "list-id" "<coreboot.coreboot.org>",