HISTIGNORE='pass *:[ ]*:otp *:oathtool *:histrm *'
+
#### begin section that works with sl() function to return from
# noninteractive ssh shells, or tty. tty because often i
# use it when something is going and io is slow and my bashrc
ifn() {
# insensitive find
+ # -L = follow symlinks
find -L . -not \( -name .svn -prune -o -name .git -prune \
-o -name .hg -prune -o -name .editor-backups -prune \
-o -name .undo-tree-history -prune \) -iname "*$**" 2>/dev/null
# * settings
-if [[ $HISTFILE ]]; then
+if [[ $LESSHISTFILE == - ]]; then
+ HISTFILE=
+ c() { cd "$@"; }
+elif [[ $HISTFILE ]]; then
HISTFILE=$HOME/.bh
fi
path-add --ifexists --end /a/work/libremanage
path-add --ifexists --end /a/opt/adt-bundle*/tools /a/opt/adt-bundle*/platform-tools
path-add --ifexists --end /a/opt/scancode-toolkit-3.10.
+path-add --ifexists --end /p/bin
case $HOSTNAME in
sy|bo)
mnsnonet() {
ns=$1
+ lomh
if ! s ip netns list | grep -Fx nonet &>/dev/null; then
s ip netns add nonet
fi
arg+=(")")
dir=${1:-.}
# debug:
- #find $dir "${arg[@]}" -size +1M
- find $dir "${arg[@]}" -size +1M -exec mpv --profile=d '{}' +
+ #find $dir "${arg[@]}" -size +200k
+ find $dir "${arg[@]}" -size +200k -exec mpv --profile=d '{}' +
}
mpvs() {
mpv --profile=s "$@";
}
+r2e() { command r2e -d /p/c/rss2email.json -c /p/c/rss2email.cfg "$@"; }
# only run on MAIL_HOST. simpler to keep this on one system.
r2eadd() { # usage: name url
# initial setup of rss2email:
# get up to date and dont send old entries now:
r2e run --no-send $1
}
-r2e() { command r2e -d /p/c/rss2email.json -c /p/c/rss2email.cfg "$@"; }
rspicy() { # usage: HOST DOMAIN
# connect to spice vm remote host. use vspicy for local host
m sudo nsenter -t $pid -n -m sudo -u $USER -i bash
}
+sdnbashroot() { # systemd namespace bash
+ local unit pid
+ if (( $# != 1 )); then
+ echo $0: error wrong number of args >&2
+ return 1
+ fi
+ unit=$1
+ pid=$(servicepid $unit)
+ m sudo nsenter -t $pid -n -m bash
+}
+
+
sdncmd() { # systemd namespace cmd
local unit pid
if (( $# <= 2 )); then
cmd_arg=${1:-run}
-std_preserve="18h 14d 8w 24m"
+std_preserve="36h 14d 8w 24m"
q_preserve="18h 14d"
case $cmd_arg in
-# https://github.com/keyboardio/Kaleidoscope/wiki/Install-Arduino-support-on-Linux
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2300", SYMLINK+="model01", ENV{ID_MM_DEVICE_IGNORE}="1"
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2301", SYMLINK+="model01", ENV{ID_MM_DEVICE_IGNORE}="1"
+## This file sets up a few things for selected Kaleidoscope-powered keyboards:
+## - We first symlink the device to a more friendly name, based on the product
+## name.
+## - We then ask ModemManager to ignore the serial ports on the device, and not
+## consider them a candidate.
+## - We also tell systemd to grant access to the device (via ACLs) to the user
+## at-seat.
+##
+## For more information about the access part, see the following resources:
+## - https://github.com/systemd/systemd/issues/4288
+## - https://www.freedesktop.org/software/systemd/man/sd-login.html
+
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2300", SYMLINK+="model01", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0", TAG+="uaccess", TAG+="seat"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2301", SYMLINK+="model01", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0", TAG+="uaccess", TAG+="seat"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2302", SYMLINK+="Atreus2", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0", TAG+="uaccess", TAG+="seat"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2303", SYMLINK+="Atreus2", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0", TAG+="uaccess", TAG+="seat"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="3496", ATTRS{idProduct}=="0005", SYMLINK+="model100", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0", TAG+="uaccess", TAG+="seat"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="3496", ATTRS{idProduct}=="0006", SYMLINK+="model100", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0", TAG+="uaccess", TAG+="seat"
a cycle_values video-rotate "90" "180" "270" "0"
+Alt+h add video-zoom 0.25
+Alt+g add video-zoom -0.25
header :contains "list-id" "<debian-security-announce.lists.debian.org>",
header :contains "list-id" "<debian-user.lists.debian.org>",
header :contains "list-id" "<debian-devel.lists.debian.org>",
- header :contains "list-id" "<ding.gnus.org>",
header :contains "list-id" "<emacs-devel.gnu.org>",
header :contains "list-id" "<emacs-orgmode.gnu.org>",
header :contains "list-id" "<git.vger.kernel.org>",