X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc2;h=1974c580b867ea432b9cff6b42664080888f9087;hb=06a56540b041accaaff795ad57664e368cb07a10;hp=f291a8adef43dda09e0b0a4f829062f5b750e663;hpb=8796be333861fd2edc6c8b9b4c22307c11fce409;p=distro-setup diff --git a/brc2 b/brc2 index f291a8a..1974c58 100644 --- a/brc2 +++ b/brc2 @@ -289,14 +289,41 @@ tback() { # sshfs example: # s sshfs bu@$host:/bu/home/md /bu/mnt -o reconnect,ServerAliveInterval=20,ServerAliveCountMax=30 -o allow_other +edelayoff() { + echo all >/etc/exim4/no-delay-eximids +} +edelayon() { + echo >/etc/exim4/no-delay-eximids +} + eqgo() { - local -a array tmpstr + local -a array tmpstr delayon + delayon=true + if grep -qFx all /etc/exim4/no-delay-eximids; then + delayon=false + fi + if $delayon; then + echo all >/etc/exim4/no-delay-eximids + fi tmpstr=$(exiqgrep -i -r.\*) mapfile -t array <<<"$tmpstr" enn -M "${array[@]}" + if $delayon; then + echo >/etc/exim4/no-delay-eximids + fi } eqgo1() { - enn -M "$(exipick -i -r.\*|h1)" + local eid + eid="$(exipick -i -r.\*|h1)" + sed -n "/^all$/p;\$a $eid" /etc/exim4/no-delay-eximids + enn -M "$eid" +} +ennm() { + local eid + for eid; do + printf "%s\n" "$eid" >>/etc/exim4/no-delay-eximids + done + enn -M "$@" } @@ -2751,11 +2778,21 @@ myirc() { # use * instead of -r since that does sorted order ssh root@iankelling.org "for f in ${d[*]}; do cd \$f/#$1; grep '\/dev/null | grep -iP --color=auto "$*" ||: - rgv -m 5 "$*" $paths /a/t.org /p/w.org /a/work.org ||: + -o -name .undo-tree-history -prune \) 2>/dev/null | grep -iP --color=auto -- "$*" ||: + rgv -m 5 -- "$*" $paths /a/t.org /p/w.org /a/work.org ||: } # setup: @@ -3817,16 +3854,24 @@ amallq() { # amall quiet amoffice "$@" } amfsf() { - sedi -r '/alertmanager.url/s/@office//' ~/.config/amtool/config.yml + sedi -r '/alertmanager.url/s/@prom.office/@prom/' ~/.config/amtool/config.yml amtool "$@" } amoffice() { - sedi -r '/alertmanager.url/s/@fsf/@office.fsf/' ~/.config/amtool/config.yml + sedi -r '/alertmanager.url/s/@prom.fsf/@prom.office.fsf/' ~/.config/amtool/config.yml amtool "$@" } amls() { amall silence query "$@" } +# amtool silence add +amsa() { + amall silence add "$@" +} +# amtool silence force +amsf() { + amall silence add x!="1" +} amrmall() { # note: not sure if quoting of this arg is correct amfsf silence expire "$(amfsf silence query -q)" @@ -3842,12 +3887,12 @@ youtube-dl-update() { # https://github.com/yt-dlp/yt-dlp/wiki/Installation yt-dlp-update() { sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp -sudo chmod a+rx /usr/local/bin/yt-dlp # Make executable - } + sudo chmod a+rx /usr/local/bin/yt-dlp # Make executable +} mpvyt() { mpv --ytdl ytdl_path=/usr/local/bin/yt-dlp "$@" - } +} # taken from default changes to bashrc and bash_profile path-add --end --ifexists $HOME/.rvm/bin