From: Ian Kelling Date: Fri, 30 Sep 2022 20:54:30 +0000 (-0400) Subject: minor improvements X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=commitdiff_plain;h=fde3746c622eb042ce1fd051cdfea2f9a247cd53 minor improvements --- diff --git a/.bashrc b/.bashrc index 35db9ac..e4a6fda 100644 --- a/.bashrc +++ b/.bashrc @@ -32,6 +32,7 @@ HISTCONTROL=ignoredups 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 diff --git a/brc b/brc index 02ad1a6..a3724fa 100644 --- a/brc +++ b/brc @@ -1236,6 +1236,7 @@ ipp() { 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 diff --git a/brc2 b/brc2 index 1905c79..346f8da 100644 --- a/brc2 +++ b/brc2 @@ -6,7 +6,10 @@ # * settings -if [[ $HISTFILE ]]; then +if [[ $LESSHISTFILE == - ]]; then + HISTFILE= + c() { cd "$@"; } +elif [[ $HISTFILE ]]; then HISTFILE=$HOME/.bh fi @@ -22,6 +25,7 @@ path-add --end ~/.local/bin 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) @@ -1202,6 +1206,7 @@ mnsr() { # mns run mnsnonet() { ns=$1 + lomh if ! s ip netns list | grep -Fx nonet &>/dev/null; then s ip netns add nonet fi @@ -1403,8 +1408,8 @@ mpvm() { 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 "$@"; @@ -1560,6 +1565,7 @@ rebr() { } +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: @@ -1578,7 +1584,6 @@ r2eadd() { # usage: name url # 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 @@ -1933,6 +1938,18 @@ sdnbash() { # systemd namespace bash 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 diff --git a/btrbk-run b/btrbk-run index 2e1bc63..51c2ed6 100644 --- a/btrbk-run +++ b/btrbk-run @@ -137,7 +137,7 @@ done cmd_arg=${1:-run} -std_preserve="18h 14d 8w 24m" +std_preserve="36h 14d 8w 24m" q_preserve="18h 14d" case $cmd_arg in diff --git a/filesystem/etc/udev/rules.d/99-kaleidoscope.rules b/filesystem/etc/udev/rules.d/99-kaleidoscope.rules index 9a67e74..9f14aaf 100644 --- a/filesystem/etc/udev/rules.d/99-kaleidoscope.rules +++ b/filesystem/etc/udev/rules.d/99-kaleidoscope.rules @@ -1,3 +1,18 @@ -# 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" diff --git a/subdir_files/.config/mpv/input.conf b/subdir_files/.config/mpv/input.conf index fc26303..0bee5f0 100644 --- a/subdir_files/.config/mpv/input.conf +++ b/subdir_files/.config/mpv/input.conf @@ -1 +1,3 @@ a cycle_values video-rotate "90" "180" "270" "0" +Alt+h add video-zoom 0.25 +Alt+g add video-zoom -0.25 diff --git a/subdir_files/sieve/lists.sieve b/subdir_files/sieve/lists.sieve index 33ff484..672f999 100644 --- a/subdir_files/sieve/lists.sieve +++ b/subdir_files/sieve/lists.sieve @@ -47,7 +47,6 @@ if anyof ( header :contains "list-id" "", header :contains "list-id" "", header :contains "list-id" "", - header :contains "list-id" "", header :contains "list-id" "", header :contains "list-id" "", header :contains "list-id" "",