From: Ian Kelling Date: Wed, 8 Nov 2023 22:01:22 +0000 (-0500) Subject: minor fixes and improvements X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=2ff8740f1061a31683152a4447340921de82b1b9;p=distro-setup minor fixes and improvements --- diff --git a/brc b/brc index 74cbb3f..048fa51 100644 --- a/brc +++ b/brc @@ -692,33 +692,6 @@ khcopy() { ssh-copy-id $1 } -# ya, hacky hardcoded hostnames in 2023. we could do better -hssh-update() { - local -a failed_hosts hosts - case $HOSTNAME in - sy|kd) - hosts=( - kd x3.office.fsf.org syw - ) - ;; - x3) - hosts=( - b8.nz sywg.b8.nz - ) - ;; - esac - for host in ${hosts[@]}; do - e $host - if ! scp /b/fai/fai/config/files/usr/local/bin/hssh/IANK root@$host:/usr/local/bin/hssh; then - failed_hosts+=($host) - fi - done - if (( ${#failed_hosts[@]} >= 1 )); then - echo failed_hosts=${failed_hosts[*]} - return 1 - fi -} - a() { local x x=$(readlink -nf "${1:-$PWD}") diff --git a/brc2 b/brc2 index cc65950..15f9539 100644 --- a/brc2 +++ b/brc2 @@ -3736,7 +3736,7 @@ rgm() { # re all my files more expansively rem() { local paths - paths="/p/c /b" + paths="/p/c /b/" find $paths -not \( -name .svn -prune -o -name .git -prune \ -o -name .hg -prune -o -name .editor-backups -prune \ -o -name .undo-tree-history -prune \) 2>/dev/null | grep -iP --color=auto -- "$*" ||: @@ -3980,6 +3980,34 @@ path-add --end --ifexists $HOME/.rvm/bin # so its included in overall env +# ya, hacky hardcoded hostnames in 2023. we could do better +hssh-update() { + local -a failed_hosts hosts + case $HOSTNAME in + sy|kd) + hosts=( + kd x3.office.fsf.org syw + ) + ;; + x3) + hosts=( + b8.nz sywg.b8.nz + ) + ;; + esac + for host in ${hosts[@]}; do + e $host + if ! scp /b/fai/fai/config/files/usr/local/bin/hssh/IANK root@$host:/usr/local/bin/hssh; then + failed_hosts+=($host) + fi + done + if (( ${#failed_hosts[@]} >= 1 )); then + echo failed_hosts=${failed_hosts[*]} + return 1 + fi +} + + export BASEFILE_DIR=/a/bin/fai-basefiles #export ANDROID_HOME=/a/opt/android-home diff --git a/i3-sway/common.conf b/i3-sway/common.conf index ba9cdbd..a658f3b 100644 --- a/i3-sway/common.conf +++ b/i3-sway/common.conf @@ -99,8 +99,8 @@ bindsym $mod+8 workspace 9 bindsym $mod+Shift+9 move container to workspace 10 bindsym $mod+9 workspace 10 - -bindsym $mod+Shift+m border toggle +b +indsym $mod+Shift+m border toggle # 65 = space. # toggle tiling / floating diff --git a/laptop-xrandr b/laptop-xrandr index 2b8425c..ce5ab36 100755 --- a/laptop-xrandr +++ b/laptop-xrandr @@ -1,13 +1,17 @@ #!/bin/bash set -e; . /usr/local/lib/err; set +e -if xrandr | grep -q '^HDMI2 disconnected' &>/dev/null; then + +output=HDMI2 +output=DP1 + +if xrandr | grep -q "^$output disconnected" &>/dev/null; then xrandr --auto else - xrandr --output HDMI2 --right-of eDP1 --mode 3840x2160 + xrandr --output $output --right-of eDP1 --mode 3840x2160 for i in 1 2 4 5 6 7 8 9 10; do # if the workspace is already there, this will fail - i3-msg '[workspace="'$i'"]' move workspace to output HDMI2 ||: + i3-msg '[workspace="'$i'"]' move workspace to output $output ||: done fi diff --git a/mail-setup b/mail-setup index 3c1ad81..e55aa47 100755 --- a/mail-setup +++ b/mail-setup @@ -2809,8 +2809,10 @@ pi liblist-allutils-perl lynx # workarounds for broken debbugsconfig which is # itself deprecated. this is temporary before I # figure out how to install from git -gunzip /usr/share/doc/debbugs/examples/text.gz -mkdir -p /etc/debbugs/sources +if [[ -e /usr/share/doc/debbugs/examples/text.gz ]]; then + gunzip /usr/share/doc/debbugs/examples/text.gz +fi +mkdir -p /etc/debbugs/indices debbugsconfig diff --git a/subdir_files/.gnupg/gpg.conf b/subdir_files/.gnupg/gpg.conf index d8ec5fc..035415d 100644 --- a/subdir_files/.gnupg/gpg.conf +++ b/subdir_files/.gnupg/gpg.conf @@ -43,12 +43,12 @@ default-key B125F60B7B287FF6A2B7DF8F170AF0E2954295DF #keyserver hkp://pgp.mit.edu #keyserver hkp://keyserver.pgp.com #keyserver hkp://ipv4.pool.sks-keyservers.net -keyserver hkp://keys.gnupg.net +#keyserver hkp://keys.gnupg.net #keyserver hkp://keyserver.ubuntu.com #keyserver hkp://keyring.debian.org #keyserver keyserver.ubuntu.com # more secure hkps, but had problems with my gpg version -#keyserver hkps://hkps.pool.sks-keyservers.net +keyserver hkps://hkps.pool.sks-keyservers.net ### begin things added by enigmail cert-digest-algo SHA256 diff --git a/switch-mail-host b/switch-mail-host index 3a362c3..22e6933 100644 --- a/switch-mail-host +++ b/switch-mail-host @@ -167,7 +167,7 @@ case $direction in e "found different version on old_host=$old_hostname, reexecing" m install -T $tmpf /usr/local/bin/switch-mail-host m /usr/local/bin/switch-mail-host --pull-reexec "${orig_args[@]}" - mexit 0 + exit 0 fi fi