chumount() {
local d
# dev/pts needed for pacman signature check
- for d in dev/pts dev proc sys; do
+ if [[ -d dev/pts ]] && mountpoint -q dev/pts; then m s umount dev/pts; fi
+ for d in dev proc sys; do
[[ -d $d ]]
if mountpoint $d &>/dev/null; then
m s umount $d
}
# df progress
-# usage: dfp MOUNTPOINT [SECOND_INTERVAL]
-# SECOND_INTERVAL defaults to 90
+# usage: dfp [-SECOND_INTERVAL] MOUNTPOINT...
+# SECOND_INTERVAL defaults to 120
dfp() {
- # mp = mountpoint
- local a b mp interval
- mp=$1
- interval=${2:-90}
- if [[ ! $mp ]]; then
- echo "dfp: error, missing 1st arg" >&2
+ local f1 f2 f3
+ local -i i mp_count M_diff interval=120
+ local -a as bs mps M_s G_s
+
+ if [[ $1 == -* ]]; then interval=${1#-}; shift; fi
+ if [[ ! $1 ]]; then
+ echo "dfp: error, missing mountpoint arg" >&2
return 1
fi
+
+ mps=("$@")
+ mp_count=$#
+
+ for (( i=0; i<mp_count; i++ )); do
+ f1+="%'d "; f2+="%4d "; f3+=" %s"
+ done
+
while true; do
- a=$(df --output=used $mp | tail -n1)
+ unset M_s G_s
+ as=( $(df -BM --output=used "${mps[@]}" | sed -n '2,$s/M//p') )
sleep $interval
- b=$(df --output=used $mp | tail -n1)
- printf "used mib: %'d mib/min: %s gib/h: %s\n" $(( b /1000 )) $(( (b-a) / (interval * 1000 / 60 ) )) \
- $(( (b-a) / (interval * 1000000 / (60*60) ) ))
+ bs=( $(df -BM --output=used "${mps[@]}" | sed -n '2,$s/M//p') )
+
+ for (( i=0; i<mp_count; i++ )); do
+ M_diff=$(( ${bs[$i]} - ${as[$i]} ))
+ M_s+=( $(( M_diff / interval )) )
+ G_s+=( $(( (M_diff * 3600) / (interval * 1024 ) )) )
+ done
+ printf "${f1}M used ${f2}M/s ${f2}G/h $f3\n" ${bs[@]} ${M_s[@]} ${G_s[@]} "${mps[@]}"
done
}
# pstree alias
pst() {
- pstree -apnAl
+ pstree -apnAlT
}
# journalctl with times in the format the --since= and --until= options accept
}
# ps grep
+#
+# Note: if stime is too nonspecifc, then run:
+# ps -eo pid,lstart,cmd
+#
+# todo: remove some output fields. This looks good:
+# UID PID PPID C RSS STIME CMD
+#
psg () {
local x y help
help="Usage: psg [--help] GREP_ARGS
# usage $0 PID...
maxpri() {
# we try process group (-g, -P) to hit related processes. If this fails, fall back to pid: (-p, -p)
- s renice -20 -g "$@"
+ if ! s renice -20 -g "$@"; then
+ m s renice -20 -p "$@"
+ m s ionice -c1 -n0 -p "$@"
+ return 0
+ fi
s ionice -c1 -n0 -P "$@"
}
# usage $0 PID...
minpri() {
- s renice 19 -g "$@"
+ if ! s renice 19 -g "$@"; then
+ m s renice 19 -p "$@"
+ m s ionice -c3 -p "$@"
+ return 0
+ fi
s ionice -c3 -P "$@"
}
# Prefix for launching a command:
sql() {
sqlite3 "$@"
- }
+}
+
+bat() {
+ batcat "$@"
+}
+
+# numerical sort args (reverse order)
+na() {
+ # low pri todo: the sed joins lines. is it more efficient to do it
+ # this way or simply x=$(cat); printf "%s\n" "$x"
+ printf "%s\n" "$@" | sort -nr| sed ':a; N; s/\n/ /; ta'
+}
+
+# wait for PID $1 to die
+pidw() {
+local x=$(mktemp); e $pid >$x; pidwait -e -F $x; rm $x
+}
# * stuff that makes sense to be at the end
elif [[ ! -f $path && -e $path.mdwn ]]; then
path=${path}.mdwn
fi
- j printf "%s\n" "$path"
+ jc printf "%s\n" "$path"
;;
*)
path=$(fp "$input")
# Returns 1 if we are not in the base mount namespace aka root mnt ns.
mntns1-p() {
+ # fyi, another way to compare:
+ #s bash -c '[[ /proc/self/ns/mnt -ef /proc/1/ns/mnt ]]'
s stat -Lc %i /proc/{1,self}/ns/mnt|uniq -d|read
}
# Like mntns1-p except with network ns.
# usage: pass encoded string on stdin
-url-decode() {
+urldecode() {
python3 -c "import sys; from urllib.parse import unquote; print(unquote(sys.stdin.read()));"
}
+# usage: STRING_TO_ENCODE
+urlenc() {
+ perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "$1"
+}
+
osimain() {
i push && i push gh main
pids+=( $tmps )
maxpri ${pids[@]}
}
+
+mnt-df() {
+ cd /mnt;
+ local mnts=$(for f in *; do if mountpoint -q $f; then e $f; fi; done)
+ df -h $mnts | awk '{printf "%8s %12s\n", $4,$NF}' | sort -hr
+}
find_paths=(/p/c/filesystem /p/c/machine_specific/*/filesystem /p/c/user-specific)
find-maybe -type d \! -name wireguard \! -path '*/moddata/*' \! -name moddata -exec chmod go+rX '{}' +
- find_paths=(/p/c/filesystem/etc/ssh /p/c/machine_specific/*/filesystem/etc/ssh)
+ find_paths=(/p/c/filesystem/etc/{,hpn}ssh /p/c/machine_specific/*/filesystem/etc/ssh /p/c/machine_specific/*/filesystem/etc/hpnssh)
find-maybe -type f \! -name '*key' -exec chmod go+rX '{}' +
find_paths=(/p/c/machine_specific/*/filesystem/etc/apt)
find-maybe -type f -exec chmod go+rX '{}' +
# Apr 12 21:25:28 sy kernel: BUG: Bad rss-counter state mm:000000003f3d390c type:MM_SHMEMPAGES val:1
#
# Then many kernel freeze messages
-# Apr 12 22:40:24 sy kernel: watchdog: BUG: soft lockup - CPU#6 stuck for 1467s! [system-status:2059]
+# Apr 12 22:40:24 sy kernel: watchdog: BUG: soft lockup - CPU#6 stuck for 1467s! [systemstatus:2059]
# Apr 12 22:40:24 sy kernel: Modules linked in: ip6t_REJECT nf_reject_ipv6 ipt_REJECT nf_reject_ipv4 xt_tcpudp nft_compat nf_tables wireguard curve25519_x86_64 libchacha20poly1305 chacha_x86_64 poly1305_x86_64 libcurve25519_generic libchacha ip6_udp_tunnel udp_tunnel ccm cmac algif_hash algif_skcipher af_alg snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic qrtr bnep binfmt_misc snd_sof_pci_intel_cnl intel_uncore_frequency intel_uncore_frequency_common snd_sof_intel_hda_common soundwire_intel snd_sof_intel_hda_mlink soundwire_cadence snd_sof_intel_hda snd_sof_pci snd_sof_xtensa_dsp snd_sof iwlmvm(OE) snd_sof_utils snd_soc_hdac_hda snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi intel_tcc_cooling soundwire_generic_allocation soundwire_bus x86_pkg_temp_thermal intel_powerclamp coretemp snd_soc_core mac80211(OE) cmdlinepart snd_compress ac97_bus kvm_intel snd_pcm_dmaengine spi_nor nls_iso8859_1 intel_rapl_msr mtd libarc4 snd_hda_intel uvcvideo snd_intel_dspcfg i915 videobuf2_vmalloc kvm snd_intel_sdw_acpi uvc
# Apr 12 22:40:24 sy kernel: videobuf2_memops snd_hda_codec btusb videobuf2_v4l2 btrtl iwlwifi(OE) processor_thermal_device_pci_legacy processor_thermal_device irqbypass btintel processor_thermal_wt_hint snd_hda_core processor_thermal_rfim processor_thermal_rapl drm_buddy snd_hwdep btbcm rapl videodev btmtk videobuf2_common intel_rapl_common mc bluetooth snd_pcm ttm processor_thermal_wt_req cfg80211(OE) ecdh_generic intel_cstate processor_thermal_power_floor snd_timer ecc drm_display_helper snd i2c_i801 spi_intel_pci cec spi_intel iwlwifi_compat(OE) soundcore i2c_smbus processor_thermal_mbox int340x_thermal_zone rc_core intel_soc_dts_iosf intel_pch_thermal intel_pmc_core i2c_algo_bit intel_vsec pmt_telemetry intel_hid pmt_class sparse_keymap system76_acpi joydev input_leds mac_hid serio_raw sch_fq_codel nfsd usbhid parport_pc auth_rpcgss ppdev nfs_acl lp lockd parport grace efi_pstore sunrpc nfnetlink dmi_sysfs ip_tables x_tables autofs4 btrfs blake2b_generic dm_crypt raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor
# Apr 12 22:40:24 sy kernel: async_tx xor raid6_pq libcrc32c raid1 raid0 hid_multitouch hid_generic 8250_dw rtsx_pci_sdmmc nvme nvme_core crct10dif_pclmul crc32_pclmul polyval_clmulni intel_lpss_pci polyval_generic ghash_clmulni_intel sha256_ssse3 rtsx_pci psmouse sha1_ssse3 intel_lpss nvme_auth xhci_pci i2c_hid_acpi idma64 xhci_pci_renesas i2c_hid hid video wmi pinctrl_cannonlake aesni_intel crypto_simd cryptd
-# Apr 12 22:40:24 sy kernel: CPU: 6 PID: 2059 Comm: system-status Tainted: G D W OEL 6.8.0-57-generic #59trisquel35
+# Apr 12 22:40:24 sy kernel: CPU: 6 PID: 2059 Comm: systemstatus Tainted: G D W OEL 6.8.0-57-generic #59trisquel35
# Apr 12 22:40:24 sy kernel: Hardware name: System76 Lemur Pro/Lemur Pro, BIOS 2023-08-18_a8dd6c2 08/18/2023
# Apr 12 22:40:24 sy kernel: RIP: 0010:native_queued_spin_lock_slowpath+0x83/0x300
# Apr 12 22:40:24 sy kernel: Code: 00 00 f0 0f ba 2b 08 0f 92 c2 8b 03 0f b6 d2 c1 e2 08 30 e4 09 d0 3d ff 00 00 00 77 61 85 c0 74 10 0f b6 03 84 c0 74 09 f3 90 <0f> b6 03 84 c0 75 f7 b8 01 00 00 00 66 89 03 5b 41 5c 41 5d 41 5e
StartLimitIntervalSec=0
[Service]
+ExecStartPre=/usr/local/bin/wghole-check
Restart=always
RestartSec=30
EOF
# case $HOSTNAME in
# sy|kd|so)
# sudo install -m 0755 -o root -g root -t /usr/bin /a/opt/bitcoin-27.0/bin/*
-# # Note: i leave it to system-status to start and stop bitcoin.
+# # Note: i leave it to systemstatus to start and stop bitcoin.
# # note: the bitcoin user & group are setup in fai
# sudo usermod -a -G bitcoin iank
# # todo: make bitcoin have a stable uid/gid
esac
-case $HOSTNAME in
- $d_host)
- sgo btrbkr{backup,2,3}.timer
- ;;
- *)
- soff btrbkr{backup,2,3}.timer
- s rm -f /etc/systemd/system/btrbkr*
- ;;
-esac
+# todo: enable frodo specific backup timers here
# misc
-sgo system-status
sgo hist-catcher
# console font size
mapper-dev devx
fi
d devx=$devx
- root_dir=$(sed -rn "s,^\s*$devx\s+(\S+).*\bsubvolid=[05]\b.*,\1,p" /etc/mtab /etc/fstab|head -n1)
+ root_dir=$(sed -rn "/[,[:space:]]subvol=/d;s,^\s*$devx\s+(\S+).*,\1,p" /etc/mtab /etc/fstab|head -n1)
if [[ $root_dir ]]; then
d root_dir=$root_dir
break
# limitations under the License.
i3-msg "workspace 4"
-if ! pgrep "^prof$" >/dev/null; then
- prof &
-fi
-# start emacs daemon for profanity if it doesnt exist.
+# start emacs daemon for profanity/znc if it doesnt exist.
id=$(i3-msg -t get_tree | jq -e '.. | select(.name?) | select(.name | test("^iznc ")).id')
emacsclient -s profanity -nc &>/dev/null
fi
-
+# IANK_BASHRC_RUN because if the command dies for some reason, we
+# dont want konsole to disappear.
+export IANK_BASHRC_RUN="prof-tmux-attach"
+konsole --profile profanity
# tree of profanity related processes:
#
-# i3-chat (ctrl+y)
-# prof
-# If this is my desktop:
-# prof-tail &
-# konsole --profile profanity -e tmux -L profanity a
-# tmux (attaches to existing profanity session)
-# If we are on a computer other than my desktop:
-# export IANK_BASHRC_RUN="prof-remote $remote"
-# konsole --profile profanity
-# prof-remote $remote
-# ssh -n $remote -- prof-tail -r | prof-notify &
-# ssh -t $remote tmux -L profanity a ||:
+# i3-chat (ctrl-y)
+# konsole --profile profanity
+# prof-tmux-attach
+# prof-tail (also ctrl-y)
#
-# systemd (on my desktop)
+# systemd user instance (on my desktop)
# profanity.service -> /usr/bin/tmux -L profanity new-session -d profanity
+#
# distro_end, on $d_host
# systemctl --user enable --now profanity.service
# /b/ds/subdir_files/.config/systemd/user/profanity.service
# /usr/bin/tmux -L profanity new-session -d profanity
-# /p/profanity-config/profrc & /d/p/profanity-config:
+# /p/profanity-config/profrc and /d/p/profanity-config:
# compose.editor=/usr/local/bin/prof-irc (alt-c)
# exec emacsclient -s profanity -a "" "$@"
#
+++ /dev/null
-#!/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 switch
-# its license to GPL.
-
-# 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.
-
-
-
-set -e; . /usr/local/lib/bash-bear; set +e
-source /p/c/domain-info
-dossh=true
-if (( $# >= 1 )); then
- remote=$1
-else
- # ssh alias
- remote=prof
- if systemctl --user --quiet is-active profanity || [[ $HOSTNAME == "$d_host" ]]; then
- dossh=false
- fi
-fi
-
-if $dossh; then
- # IANK_BASHRC_RUN because if prof-remote dies for some reason, we
- # I dont want konsole to disappear.
- export IANK_BASHRC_RUN="prof-remote $remote"
- konsole --profile profanity
-else
- # output will go to ~/.xsession-errors
- prof-tail |& ts "%F %T" &
- konsole --profile profanity -e tmux -L profanity a
-fi
+++ /dev/null
-#!/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 switch
-# its license to GPL.
-
-# 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.
-
-set -e; . /usr/local/lib/bash-bear; set +e
-
-# -A = --ignore-ancestors (dont kill ourselves)
-pkill -fxA '/bin/bash /usr/local/bin/prof-notify' ||:
-
-
-while true; do
- read -r line || sleep 5
- #echo "prof-notify debug line: $line"
-
- # check that the profanity window is not focused
- if [[ $line ]] && ! i3-check-profanity &>/dev/null; then
- # the profanity tag makes it so new notification replaces old.
- dunstify -h string:x-dunst-stack-tag:profanity -- "$line"
- fi
-done
+++ /dev/null
-#!/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 switch
-# its license to GPL.
-
-# 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.
-
-
-
-set -e; . /usr/local/lib/bash-bear; set +e
-
-remote=$1
-fastcon=0
-while true; do
- start=$EPOCHSECONDS
- if ! ssh-add -l | grep SHA256:YEhwH5u+wkqkSl/dCq8rFebi2qz7Os3RmIWPxMg13eA &>/dev/null; then
- ssh -n $remote
- fi
- # -n or else it competes with the other ssh for reading stdin.
- # -l iank is just a safety measure against misconfig/temporary config in .ssh/config.
- ssh -l iank -n $remote -- prof-tail -r |& prof-notify &
- ssh -l iank -t $remote tmux -L profanity a ||:
- builtin kill %% &> /dev/null ||:
- if (( EPOCHSECONDS > start + 600 )); then
- fastcon=0
- fi
- # we try to reconnect quickly for a while (just once as I write this),
- # then try to reconnect slowly.
- if (( fastcon < 1 )); then
- echo "waiting 10. any key to cancel"
- read -rsN1 -t 10 ||:
- fastcon=$((fastcon+1))
- else
- echo "waiting 120. any key to cancel"
- # like sleep but stop on any input
- read -rsN1 -t 120 ||:
- fi
-done
# See the License for the specific language governing permissions and
# limitations under the License.
+# when called from i3,
+# output will go to ~/.xsession-errors
+
+
set -e; . /usr/local/lib/bash-bear; set +e
# We infinite retry, not exit on error.
trap err-info ERR
-remote=false
-if [[ $1 == -r ]]; then
- remote=true
- shift
+source /p/c/domain-info
+
+if systemctl --user --quiet is-active profanity || [[ $HOSTNAME == "$d_host" ]]; then
+ : # no ssh needed
+else
+ # note: -n is probably not needed. I used it before when running ssh in the
+ # -background with &, so that it would not compete with other commands
+ # -for stdin.
+ if ! ssh-add -l | grep SHA256:YEhwH5u+wkqkSl/dCq8rFebi2qz7Os3RmIWPxMg13eA &>/dev/null; then
+ ssh -nN prof
+ fi
+ ssh_cmd="ssh -l iank -n prof --"
fi
+
debug=false
if [[ $1 == -d ]]; then
debug=true
fi
## flag to do manual testing during development
-dev=false
tailn=0
if [[ $1 == -e ]]; then
dev_date=(-d '-1 day')
tailn=100000
debug=true
- dev=true
shift
fi
-if ! $dev; then
- pkill -fA '^/bin/bash /usr/local/bin/prof-tail' ||:
+if pgrep -fA '^/bin/bash /usr/local/bin/prof-tail'; then
+ if [[ -t 1 ]]; then
+ echo "prof-tail already running. exiting"
+ fi
+ exit 0
fi
# kill 0 doesn't seem to be documented in man bash, but it kills the
# devinu
# miriam
# ruben
+# johnh
xmpp_users=(
jtuttle
ekokao
gregf
heshan
- johnh
jrasata
ksiewicz
michael
# note: man timeout says 124 is when timeout times out.
# for debugging, add test2 to the room list and use jtuttle with pidgin.
- timeout $secs_till_midnight tail -n$tailn -qF \
- $logdir/rooms/{sys-private,office,operations}_at_conference.fsf.org/$log_today ${user_logs[@]} 2>/dev/null \
+ $ssh_cmd tail -n$tailn -qF \
+ $logdir/rooms/{sys-private,office,operations}_at_conference.fsf.org/$log_today ${user_logs[@]} 2>/dev/null \
| sed -urn "/$pre iank: /d;s/$pre ([^@ ]+: .*\biank\b.*)/\1/p;s/$pre ([^@:]+)@.*/pm: \1/p" || [[ ${PIPESTATUS[0]} == 124 ]]
}
pre="^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{6}-[0-9]{2} -"
-declare -i fail_loops=0 loop_start
while true; do
- loop_start=$EPOCH_SECONDS
midnight=$(date -d '00:00:00 tomorrow' +%s)
- secs_till_midnight=$(( midnight - EPOCHSECONDS ))
log_today=$(date '+%Y_%m_%d' "${dev_date[@]}").log
logdir=/home/iank/.local/share/profanity/chatlogs/iank_at_fsf.org
user_logs=()
user_logs+=($logdir/${u}_at_fsf.org/$log_today)
done
- if $remote; then
- tail-cmd
- else
- tail-cmd | while read -r l 2>/dev/null; do notify-cmd "$l"; done
- fi
-
- if (( loop_start >= EPOCH_SECONDS - 1 )); then
- fail_loops+=1
- else
- fail_loops=0
- fi
- if (( fail_loops >= 60 * 60 * 3 )); then
- echo "prof-tail fail_loops: $fail_loops" >&2
- exit 1
- fi
+ tail-cmd | while true; do
+ if (( EPOCHSECONDS > midnight + 3 )); then break; fi
+ read -t 15 -r l 2>/dev/null || continue
+ notify-cmd "$l"
+ done
sleep 2
done
# echo COMMAND if verbose=true & if it fails.
# Like m, but more quietly.
mq() {
- local evars ret=0
- while [[ $1 == *=* ]]; do
+ local evars ret=0 var_regex='^[a-zA-Z_][a-zA-Z_0-9]*='
+ while [[ $1 =~ $var_regex ]]; do
declare -x "$1"
evars+="$1 "
shift
cat >> $nr/etc/fstab <<EOF
$rootdev / btrfs $fstabstd,noatime,subvol=root_$subvol$mopts 0 0
-$rootdev /mnt/root btrfs $fstabstd,noatime,subvolid=0$mopts 0 0
+$rootdev /mnt/root btrfs $fstabstd,noatime$mopts 0 0
$bootdev /boot btrfs nofail,$fstabstd,noatime,subvol=boot_$subvol 0 0
-$bootdev /mnt/boot btrfs nofail,$fstabstd,noatime,subvolid=0 0 0
+$bootdev /mnt/boot btrfs nofail,$fstabstd,noatime 0 0
tmpfs /tmp tmpfs nodev,nosuid,size=50%,mode=1777 0 0
EOF
awk '$2 == "/boot/efi" {print}' /etc/fstab >>$nr/etc/fstab
# eh, dont really like web page titles + a long browser name string.
for_window [class="firefox" instance="Navigator" window_role="browser"] title_format "b"
bindsym $mod+y $ex copyq-restart
-bindsym $mod+shift+y $ex "i3-chat"
+bindsym $mod+shift+y $ex "i3-chat"; $ex "prof-tail"
# unused
#bindsym $mod+shift+F1
source /a/bin/ds/script-files
rs ${my_bin_files[@]} /usr/local/bin
-rs $my_lib_files /usr/local/lib
+rs ${my_lib_files[@]} /usr/local/lib
sre() {
+++ /dev/null
-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
rate_limit no
volume /mnt/r2
-subvolume p
+subvolume srip1
subvolume fsf-mailrec
-# moved
-#subvolume ar
-#subvolume roverflow
rate_limit no
volume /mnt/r3
-subvolume d-r3
-subvolume siterip
+
subvolume ar
+subvolume d-r3
+
+subvolume m8
+subvolume m9
+
+subvolume qr
+subvolume srip2
rate_limit no
volume /mnt/r4
+subvolume m3
+subvolume m4
+subvolume m5
+subvolume m6
+subvolume m7
+subvolume ma
+subvolume mb
+subvolume mc
+subvolume md
+subvolume me
+subvolume mf
+
subvolume roverflow
target_preserve_min 2d
rate_limit no
+
volume /mnt/r5
subvolume d
-subvolume r
-subvolume rbase
-subvolume rjson
-subvolume mhot
+++ /dev/null
-transaction_syslog local7
-
-lockfile /var/lock/btrbk-root-r.lock
-
-timestamp_format long-iso
-
-snapshot_create onchange
-
-snapshot_preserve 18h 14d 8w 12m
-snapshot_preserve_min 2h
-snapshot_dir btrbk
-
-target_preserve 18h 14d 8w 12m
-target_preserve_min 2h
-
-rate_limit no
-volume /mnt/root
-subvolume r
-target send-receive /mnt/r5/btrbk
+++ /dev/null
-[Unit]
-Description=Btrbk r to rust
-After=multi-user.target
-
-[Service]
-Type=oneshot
-ExecStart=/usr/local/bin/sysd-mail-once btrbkr btrbk -c /etc/btrbk/root-r.conf run
+++ /dev/null
-[Unit]
-Description=Btrbk r to rust timer
-
-[Timer]
-OnCalendar=*-*-* 15:00:00 America/New_York
-
-[Install]
-WantedBy=timers.target
+++ /dev/null
-[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
+++ /dev/null
-[Unit]
-Description=Btrbk f2 timer
-
-[Timer]
-OnCalendar=*-*-* 13:00:00 America/New_York
-
-[Install]
-WantedBy=timers.target
# honVi-0000u3-82 Failed to create directory "/var/spool/exim4/input": No such file or directory
# so, im trying a bind mount to get rid of that.
if [[ -e /nocow ]]; then
- if ! grep -Fx "/nocow/exim4 /var/spool/exim4 none bind 0 0" /etc/fstab; then
- echo "/nocow/exim4 /var/spool/exim4 none bind 0 0" >>/etc/fstab
+ if ! grep -E "^/nocow/exim4[[:space:]]+/var/spool/exim4[[:space:]]+none[[:space:]]+.*bind" /etc/fstab; then
+ echo "/nocow/exim4 /var/spool/exim4 none bind,nofail,x-systemd.mount-timeout=290s 0 0" >>/etc/fstab
fi
u /etc/systemd/system/exim4.service.d/override.conf <<'EOF'
[Unit]
# for system76 laptop with i3 keybind.
brightnessctl
build-essential
+ btop
bwm-ng
ccache
cheese
)
# note: turn this into an array if we ever add more
-my_lib_files=/a/bin/bash-bear-trap/bash-bear
-
+my_lib_files=(
+ /a/bin/bash-bear-trap/bash-bear
+ fsf-script-lib
+)
2 screens: Width=1916
2 screens: XPosition=2
2 screens: YPosition=2
-3840x2160 screen: Height=2156
-3840x2160 screen: Width=3836
-3840x2160 screen: XPosition=1282
-3840x2160 screen: YPosition=2
+3840x2160 screen: Height=2142
+3840x2160 screen: Width=1916
+3840x2160 screen: XPosition=2
+3840x2160 screen: YPosition=16
DP-0=DP-0
DP-1 eDP-1=DP-1
DP-1-1 eDP-1=DP-1-1
DP-1-3 eDP-1=eDP-1
HDMI-1 eDP-1=eDP-1
HDMI-2 eDP-1=HDMI-2
-MenuBar=Enabled
-RestorePositionForNextInstance=false
-State=AAAA/wAAAAD9AAAAAQAAAAAAAAAAAAAAAPwCAAAAAvsAAAAiAFEAdQBpAGMAawBDAG8AbQBtAGEAbgBkAHMARABvAGMAawAAAAAA/////wAAATUA////+wAAABwAUwBTAEgATQBhAG4AYQBnAGUAcgBEAG8AYwBrAAAAAAD/////AAAA5QD///8AAA78AAAIVgAAAAQAAAAEAAAACAAAAAj8AAAAAQAAAAIAAAACAAAAFgBtAGEAaQBuAFQAbwBvAGwAQgBhAHIAAAAAAP////8AAAAAAAAAAAAAABwAcwBlAHMAcwBpAG8AbgBUAG8AbwBsAGIAYQByAAAAAAD/////AAAAAAAAAAA=
+MenuBar=Disabled
+State=AAAA/wAAAAD9AAAAAQAAAAAAAAAAAAAAAPwCAAAAAvsAAAAiAFEAdQBpAGMAawBDAG8AbQBtAGEAbgBkAHMARABvAGMAawAAAAAA/////wAAATUA////+wAAABwAUwBTAEgATQBhAG4AYQBnAGUAcgBEAG8AYwBrAAAAAAD/////AAAA5QD///8AAAd8AAAIbAAAAAQAAAAEAAAACAAAAAj8AAAAAQAAAAIAAAACAAAAFgBtAGEAaQBuAFQAbwBvAGwAQgBhAHIAAAAAAP////8AAAAAAAAAAAAAABwAcwBlAHMAcwBpAG8AbgBUAG8AbwBsAGIAYQByAAAAAAD/////AAAAAAAAAAA=
ToolBarsMovable=Disabled
eDP-1=eDP-1
# After=default.target. I figured this probably works and is simpler.
After=gpg-agent.service
After=local-fs.target
+# on desktop, we need /d to mount, and based on logs, this is the next target after it mounts:
+After=multi-user.target
[Service]
# tmux requirement
if grep -qxF $HOSTNAME $x; then all_dirs+=( ${x%.hosts} ); fi
done
- script_files=("${my_service_scripts[@]}" "${my_bin_files[@]}" $my_lib_files)
+ script_files=("${my_service_scripts[@]}" "${my_bin_files[@]}" "${my_lib_files[@]}")
# Just because i forget a lot, -mmin -NUM means files modified <= NUM minutes ago
if (( fmin < 0 )) && [[ $(find "${script_files[@]}" ${all_dirs[@]} -mmin $fmin -type f -print -quit 2>/dev/null) ]]; then