From ca61084446e48fb0703ce2a203c1bd18ceaf4dfb Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Mon, 17 Jun 2024 21:50:48 -0400 Subject: [PATCH] i3 fix, other improvements --- brc | 83 ++++++++----------- brc2 | 33 +++++--- .../renewal-hooks/deploy/certbot-renew-hook | 1 + g | 46 +++++++--- i3-abrowser | 30 ++++--- i3-emacs | 11 +-- i3-event-hook | 6 +- i3-focus-maybe | 41 +++++++++ i3-konsole | 13 +-- i3-set-layout | 21 +++++ mail-setup | 44 +++++----- .../.local/share/konsole/profileian.profile | 16 ++++ system-status | 4 +- 13 files changed, 218 insertions(+), 131 deletions(-) create mode 100755 i3-focus-maybe diff --git a/brc b/brc index f9c039d..0745bff 100644 --- a/brc +++ b/brc @@ -244,10 +244,6 @@ if [[ $- == *i* ]]; then use_color=true fi - if [[ $KONSOLE_PROFILE_NAME ]]; then - TERM=xterm-256color - fi - # todo: not sure this works in sakura #stty werase undef #bind "\C-w": kill-region @@ -319,9 +315,6 @@ export SL_INFO_DIR=/p/sshinfo if [[ -s $bashrc_dir/path-add-function ]]; then source $bashrc_dir/path-add-function if [[ $SSH_CLIENT ]]; then - if grep -qF /home/iank/.iank/e/e /etc/exports &>/dev/null; then - export EMACSDIR=/home/iank/.iank/e/e - fi path-add $bashrc_dir fi fi @@ -1041,6 +1034,7 @@ cf() { done } caf() { + local file find -L "$@" -type f -not \( -name .svn -prune -o -name .git -prune \ -o -name .hg -prune -o -name .editor-backups -prune \ @@ -1048,6 +1042,11 @@ caf() { | awk -F '\0' '{print $3}' 2>/dev/null | while read -r file; do hr "$file" v "$file" + # if the file is nonempty and the last char is nonempty, it is not + # newline terminated. + if [[ -s "$file" && "$(tail -c 1 "$file")" ]]; then + echo + fi done } ccomp cat cf caf @@ -1322,9 +1321,9 @@ etailm() { tail -F /var/log/exim4/mainlog -n 200 "$@" } etail2() { - tail -F /var/log/exim4/mymain -n 200 "$@" + tail -F /var/log/exim4/nondmain -n 200 "$@" } -# shortcut +# shortcut for tail -F ta() { tail -F "$@" } @@ -1620,42 +1619,6 @@ and works in older versions of git which did not have that." echo "${p%%/.git}" } -g() { - - local args gdb=false - - if [[ $EMACSDIR ]]; then - path-add "$EMACSDIR/lib-src" "$EMACSDIR/src" - fi - - if [[ $DISPLAY ]]; then - args=-n - fi - - if (( $# == 0 )); then - args+=" -c" - fi - # duplicate -c, but oh well - if ! pgrep -u $EUID emacsclient; then - if (( $# == 0 )) && type -p gdb &>/dev/null; then - gdb=true - else - args+=" -c" - fi - fi - if $gdb; then - # due to a bug, we cant debug from the start unless we get a new gdb - # https://sourceware.org/bugzilla/show_bug.cgi?id=24454 - # m gdb -ex="set follow-fork-mode child" -ex=r -ex=quit --args emacs --daemon - m emacsclient -a "" $args "$@" - sleep 1 - cd "/a/opt/emacs-$(distro-name)$(distro-num)" - s gdb -p "$(pgrep -f 'emacs --daemon')" -ex c - cd - - else - m emacsclient -a "" $args "$@" - fi -} # g pipe. like: cmd | emacs. save cmd output to tmp file, then edit. gp() { @@ -1701,9 +1664,9 @@ grr() { # grep recursive # Don't return 1 on nonmatch because this is meant to be # interactive, not in a conditional. if [[ ${#@} == 1 ]]; then - grep --exclude-dir='*.emacs.d' --exclude-dir='*.git' -riIP --color=auto "$@" . || [[ $? == 1 ]] + grep --exclude-dir='*.emacs.d' --exclude-dir='*.git' -rniIP --color=auto "$@" . || [[ $? == 1 ]] else - grep --exclude-dir='*.emacs.d' --exclude-dir='*.git' -riIP --color=auto "$@" || [[ $? == 1 ]] + grep --exclude-dir='*.emacs.d' --exclude-dir='*.git' -rniIP --color=auto "$@" || [[ $? == 1 ]] fi } ccomp grep gr grr @@ -2943,9 +2906,19 @@ psoff() { # however, DEBUG is not inherited, so we need to run it outside a function. # And we want to run set -x afterwards to avoid spam, so we cram everything # in here, and then it will run after this function is done. - # # set as array to satisfy shellcheck, but it is equivalent to setting it as non-array - PROMPT_COMMAND=('trap DEBUG; unset PROMPT_COMMAND; PS1="\w \$ "') + # shellcheck disable=SC2178 # intentional + PROMPT_COMMAND='trap DEBUG; unset PROMPT_COMMAND; PS1=" \w \$ "' +} + +pskde() { + # shellcheck disable=SC2178 # intentional + PROMPT_COMMAND='trap DEBUG; unset PROMPT_COMMAND' + PS1='\[\e]133;L\a\]\[\e]133;D;$?\]\[\e]133;A\a\]\w \$ \[\e]133;B\a\]' ; + PS2='\[\e]133;A\a\]'$PS2'\[\e]133;B\a\]' ; + PS0='\[\e]133;C\a\]' + } + pson() { PROMPT_COMMAND=(prompt-command) if [[ $TERM == *(screen*|xterm*|rxvt*) ]]; then @@ -3334,6 +3307,7 @@ if [[ $- == *i* ]]; then prompt-command() { local return=$? # this MUST COME FIRST + # all usable colors: # black # green nonzero exit (pri 1) @@ -3414,6 +3388,8 @@ if [[ $- == *i* ]]; then fi PS1="${PS1%"${PS1#*[wW]}"} $jobs_char$psudo\[$ps_color\]$ps_char\[$term_nocolor\] " + + # copy of what is automatically added by guix. # adds [env] to PS1 if GUIX_ENVIRONMENT is set and PS1 contains '$'; if [ -n "$GUIX_ENVIRONMENT" ]; then @@ -3426,6 +3402,15 @@ if [[ $- == *i* ]]; then # set titlebar. instead, using more advanced # titelbar below #echo -ne "$_title_escape $HOSTNAME ${PWD/#$HOME/~} \007" + + if [[ $KONSOLE_VERSION ]]; then + # from konsole, output via ctrl-alt-] + if [[ ! $PS1 =~ 133 ]] ; then + PS1='\[\e]133;L\a\]\[\e]133;D;$?\]\[\e]133;A\a\]'$PS1'\[\e]133;B\a\]' ; + PS2='\[\e]133;A\a\]'$PS2'\[\e]133;B\a\]' ; + PS0='\[\e]133;C\a\]' ; fi + fi + } PROMPT_COMMAND=(prompt-command) diff --git a/brc2 b/brc2 index 104907e..f9acada 100644 --- a/brc2 +++ b/brc2 @@ -364,29 +364,30 @@ edelayon() { eqgo() { local -a array tmpstr delayon delayon=true - if grep -qFx all /etc/exim4/no-delay-eximids; then + if grep -qFx all /var/spool/exim4/gw/.no-delay-eximids; then delayon=false fi if $delayon; then - echo all >/etc/exim4/no-delay-eximids + echo all >/var/spool/exim4/gw/.no-delay-eximids fi tmpstr=$(exiqgrep -i -r.\*) mapfile -t array <<<"$tmpstr" enn -M "${array[@]}" if $delayon; then - echo >/etc/exim4/no-delay-eximids + echo >/var/spool/exim4/gw/.no-delay-eximids fi } eqgo1() { local eid eid="$(exipick -i -r.\*|h1)" - sed -n "/^all$/p;\$a $eid" /etc/exim4/no-delay-eximids + sed -n "/^all$/p;\$a $eid" /var/spool/exim4/gw/.no-delay-eximids enn -M "$eid" } +# exim -M (in namespace and without delay) ennm() { local eid for eid; do - printf "%s\n" "$eid" >>/etc/exim4/no-delay-eximids + printf "%s\n" "$eid" >>/var/spool/exim4/gw/.no-delay-eximids done enn -M "$@" } @@ -3904,7 +3905,7 @@ torshell() { } eless2() { - less /var/log/exim4/mymain + less /var/log/exim4/nondmain } @@ -4013,7 +4014,7 @@ tu() { enn() { local ecmd pid - ecmd="/usr/sbin/exim4 -C /etc/exim4/my.conf" + ecmd="/usr/sbin/exim4 -C /etc/exim4/nn-mainlog.conf" if ip a show veth1-mail &>/dev/null; then s $ecmd "$@" else @@ -4610,7 +4611,15 @@ if type -P rg &>/dev/null; then # --no-messages because of annoying errors on broken symlinks # -z = search .gz etc files # -. = search dotfiles - rg() { command rg -. -z --no-messages -L -i -M 900 --no-ignore-parent --no-ignore-vcs -g '!.git' -g '!auto-save-list' -g '!.savehist' "$@" || return $?; } + # -n --no-heading: show files and line numbers together allowing for clicking + rg() { + local path_arg + if [[ ${#@} == 1 ]]; then + path_arg=. + fi + + command rg -. -z --no-messages -Lin --no-heading -M 900 --no-ignore-parent --no-ignore-vcs -g '!.git' -g '!auto-save-list' -g '!.savehist' "$@" $path_arg || return $? + } #fails if not exist. ignore complete -r rg 2>/dev/null ||: else @@ -4619,7 +4628,10 @@ fi # rg with respecting vcs ignore files rgv() { - ret=0 + local path_arg ret=0 + if [[ ${#@} == 1 ]]; then + path_arg=. + fi # settings that are turned off for pipes, keep them on. # Found by searching for "terminal" in --help # --heading @@ -4629,9 +4641,10 @@ rgv() { # -z = search zipped files # -i = case insensitive # -M = max columns + # -n --no-heading: show files and line numbers together allowing for clicking # --no-messages because of annoying errors on broken symlinks # --no-ignore-parent because i have /a/.git which ignores almost everything under it. - command rg -n --heading -. -z --no-messages -i -M 900 --no-ignore-parent -g '!.git' -g '!auto-save-list' -g '!.savehist' "$@" || ret=$? + command rg -n --no-heading -. -z --no-messages -i -M 900 --no-ignore-parent -g '!.git' -g '!auto-save-list' -g '!.savehist' "$@" $path_arg || ret=$? return $ret } diff --git a/filesystem/etc/letsencrypt/renewal-hooks/deploy/certbot-renew-hook b/filesystem/etc/letsencrypt/renewal-hooks/deploy/certbot-renew-hook index 86bb1f8..1af5216 100755 --- a/filesystem/etc/letsencrypt/renewal-hooks/deploy/certbot-renew-hook +++ b/filesystem/etc/letsencrypt/renewal-hooks/deploy/certbot-renew-hook @@ -49,5 +49,6 @@ case $dir in /etc/letsencrypt/live/mail2.iankelling.org|/etc/letsencrypt/live/je.b8.nz) install -m 644 $dir/fullchain.pem /etc/exim4/exim.crt install -m 640 -g Debian-exim $dir/privkey.pem /etc/exim4/exim.key + systemctl reload dovecot ;; esac diff --git a/g b/g index 199b8ad..d559b8a 100755 --- a/g +++ b/g @@ -36,14 +36,38 @@ # -a = alternate editor, empty string makes it start emacs daemon. # This is also set via env variable, but that doesn't propagate everywhere. -# emacs will hold open the directory it's started in, which -# will prevent unmounting it. -if [[ ! $1 ]]; then - cd / -fi - -if pgrep -u $EUID emacsclient && (( $# )); then - emacsclient -a "" -n "$@" -else - emacsclient -a "" -nc "$@" -fi + +g() { + + local args gdb=false + + if [[ $DISPLAY ]]; then + args=-n + fi + + if (( $# == 0 )); then + args+=" -c" + fi + # duplicate -c, but oh well + if ! pgrep -u $EUID emacsclient &>/dev/null; then + if (( $# == 0 )) && type -p gdb &>/dev/null; then + gdb=true + else + args+=" -c" + fi + fi + if $gdb; then + # due to a bug, we cant debug from the start unless we get a new gdb + # https://sourceware.org/bugzilla/show_bug.cgi?id=24454 + # m gdb -ex="set follow-fork-mode child" -ex=r -ex=quit --args emacs --daemon + emacsclient -a "" $args "$@" + sleep 1 + cd "/a/opt/emacs-$(distro-name)$(distro-num)" + sudo gdb -p "$(pgrep -f 'emacs --daemon')" -ex c + cd - + else + emacsclient -a "" $args "$@" + fi +} + +g "$@" diff --git a/i3-abrowser b/i3-abrowser index 8c5a208..2afbff3 100755 --- a/i3-abrowser +++ b/i3-abrowser @@ -41,23 +41,29 @@ else b=firefox fi -# mark if we dont have a mark already -if i3-msg -t get_tree | jq --stream -r 'select(.[1]|scalars!=null) | "\(.[0]|join(".")): \(.[1]|tojson)"' | grep 'marks.0: "abrowser"$' &>/dev/null; then - h=$(i3-msg -t get_tree | jq -r ".. | select(.focused? == true) | .rect.height") - cur_workspace=$(i3-msg -t get_workspaces | jq -r '.[] | select(.focused? == true) | .name') - - # h tests if we have a current focus, but that is just a random guess. - if [[ $cur_workspace == 2 && $h ]]; then - i3-msg "swap container with mark abrowser; [con_mark=\"abrowser\"] focus" - else - i3-msg "[con_mark=\"abrowser\"] focus" - fi +# spawn and mark if we dont have a mark already +if ! /a/c/i3-focus-maybe abrowser; then -else i3-split-maybe $b "$@" & # on a fast computer, .5 is too fast, 1 is ok. on x200, 1 is too fast, 2 is ok. sleep 2 i3-msg "[workspace=__focused__ class=\"$b\" instance=\"Navigator\" window_role=\"browser\"] mark abrowser" wait + +# else + # # If we were streaming 1/4 of the screen without separate workspaces, we might + # # want something like this. But as is, it is better to just focus. same deal in + # # my other programs like this one, but I removed the code there. + # + # cur_workspace=$(i3-msg -t get_workspaces | jq -r '.[] | select(.focused? == true) | .name') + # i3-msg "[con_mark=\"abrowser\"] focus" + + # if [[ $cur_workspace == 2 ]]; then + # i3-msg "swap container with mark abrowser; [con_mark=\"abrowser\"] focus" + # else + # i3-msg "[con_mark=\"abrowser\"] focus" + # fi + + fi diff --git a/i3-emacs b/i3-emacs index 6b4cce2..19fc46a 100755 --- a/i3-emacs +++ b/i3-emacs @@ -24,16 +24,7 @@ id=$(i3-msg -t get_tree | jq -e '.. | select(.name?) | select(.name | test("^e-iak ")).id') if [[ $id ]]; then - h=$(i3-msg -t get_tree | jq -r ".. | select(.focused? == true) | .rect.height") - - cur_workspace=$(i3-msg -t get_workspaces | jq -r '.[] | select(.focused? == true) | .name') - - # h tests if we have a current focus, but that is just a random guess. - if [[ $cur_workspace == 2 && $h ]]; then - i3-msg "swap container with con_id $id; [con_id=\"$id\"] focus" - else - i3-msg "[con_id=\"$id\"] focus" - fi + i3-msg "[con_id=\"$id\"] focus" else i3-split-maybe diff --git a/i3-event-hook b/i3-event-hook index bcee20e..87487c6 100755 --- a/i3-event-hook +++ b/i3-event-hook @@ -58,7 +58,7 @@ def find_workspace(i3, window_id): def kill_single_win_containers(i3, e, node, parent): if len(parent.nodes) == 1 and len(node.nodes) == 0: - print("d1: killing parent") + #print("d1: killing parent") # parent is a single window container, kill it. # Note: based on testing, @@ -67,10 +67,10 @@ def kill_single_win_containers(i3, e, node, parent): # we could create our disabling file here # and delete it later if it wasn't already there. i3.command('[con_id=%s] focus' % node.id) - i3.command('mark i3ha') + i3.command('mark --add i3ha') i3.command('focus parent') i3.command('focus parent') - i3.command('mark i3hb') + i3.command('mark --add i3hb') i3.command('[con_mark="i3ha"] focus') i3.command('move window to mark i3hb') i3.command('unmark i3ha') diff --git a/i3-focus-maybe b/i3-focus-maybe new file mode 100755 index 0000000..e37141c --- /dev/null +++ b/i3-focus-maybe @@ -0,0 +1,41 @@ +#!/usr/bin/python3 +# 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 change +# to a recommended GPL license. + +# 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. + + +import sys +from pprint import pprint +from i3ipc import Connection, Event + + +def main(): + i3 = Connection() + marked = i3.get_tree().find_marked("^" + sys.argv[1] +"$") + if not marked: + exit(1) + marked[0].command("focus") + # debug + # pprint(marked[0]) + # pprint(vars(marked[0])) + + +if __name__ == "__main__": + main() diff --git a/i3-konsole b/i3-konsole index 74fd2c2..92afe30 100755 --- a/i3-konsole +++ b/i3-konsole @@ -26,18 +26,7 @@ set -eE -o pipefail trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" exit status: $?, PIPESTATUS: ${PIPESTATUS[*]}" >&2' ERR -if i3-msg -t get_tree | jq --stream -r 'select(.[1]|scalars!=null) | "\(.[0]|join(".")): \(.[1]|tojson)"' | grep 'marks.0: "term"$' &>/dev/null; then - h=$(i3-msg -t get_tree | jq -r ".. | select(.focused? == true) | .rect.height") - - cur_workspace=$(i3-msg -t get_workspaces | jq -r '.[] | select(.focused? == true) | .name') - - # h tests if we have a current focus, but that is just a random guess. - if [[ $cur_workspace == 2 && $h ]]; then - i3-msg "swap container with mark term; [con_mark=\"term\"] focus" - else - i3-msg "[con_mark=\"term\"] focus" - fi -else +if ! /a/c/i3-focus-maybe term; then i3-split-maybe konsole & sleep 1 diff --git a/i3-set-layout b/i3-set-layout index 6e28c71..9f8c247 100755 --- a/i3-set-layout +++ b/i3-set-layout @@ -1,4 +1,25 @@ #!/usr/bin/python3 +# 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 change +# to a recommended GPL license. + +# 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. + import sys from i3ipc import Connection, Event diff --git a/mail-setup b/mail-setup index d19fba0..7ce6a0d 100755 --- a/mail-setup +++ b/mail-setup @@ -41,15 +41,15 @@ # /usr/sbin/invoke-rc.d-diverted "$@" # fi -# Things I tend to forget. on MAIL_HOST, daemon runs with /etc/exim4/my.conf, +# Things I tend to forget. on MAIL_HOST, daemon runs with /etc/exim4/nn-mainlog.conf, # due to /etc/default/exim4 containing: -# COMMONOPTIONS='-C /etc/exim4/my.conf' -# UPEX4OPTS='-o /etc/exim4/my.conf' +# COMMONOPTIONS='-C /etc/exim4/nn-mainlog.conf' +# UPEX4OPTS='-o /etc/exim4/nn-mainlog.conf' # # The non-daemon config -# gets generated from this script calling update-exim4.conf -d /etc/myexim4 +# gets generated from this script calling update-exim4.conf -d /etc/nond-exim4 # which has log path -# log_file_path = /var/log/exim4/my%s +# log_file_path = /var/log/exim4/nond%s # # On non bk|MAIL_HOST, the config and log file are all standard. # @@ -3075,10 +3075,10 @@ case $HOSTNAME in u /etc/default/exim4 <<'EOF' QUEUERUNNER='combined' QUEUEINTERVAL='10m' -COMMONOPTIONS='-C /etc/exim4/my.conf' -UPEX4OPTS='-o /etc/exim4/my.conf' +COMMONOPTIONS='-C /etc/exim4/nn-mainlog.conf' +UPEX4OPTS='-o /etc/exim4/nn-mainlog.conf' # in t12 exim, this replaces all the above options -EXIMSERVICE='-bdf -q10m -C /etc/exim4/my.conf' +EXIMSERVICE='-bdf -q10m -C /etc/exim4/nn-mainlog.conf' # i use epanic-clean for alerting if there are bad paniclog entries E4BCD_WATCH_PANICLOG='no' EOF @@ -3088,13 +3088,13 @@ EOF chmod g+s,u+s /usr/sbin/exim4 # need this to avoid error on service reload: # 2022-08-07 18:44:34.005 [892491] pid 892491: SIGHUP received: re-exec daemon - # 2022-08-07 18:44:34.036 [892491] cwd=/var/spool/exim4 5 args: /usr/sbin/exim4 -bd -q30m -C /etc/exim4/my.conf + # 2022-08-07 18:44:34.036 [892491] cwd=/var/spool/exim4 5 args: /usr/sbin/exim4 -bd -q30m -C /etc/exim4/nn-mainlog.conf # 2022-08-07 18:44:34.043 [892491] socket bind() to port 25 for address (any IPv6) failed: Permission denied: waiting 30s before trying again (9 more tries) # note: the daemon gives up and dies after retrying those 9 times. # I came upon this by guessing and trial and error. setcap CAP_NET_BIND_SERVICE+ei /usr/sbin/exim4 u /etc/exim4/trusted_configs <<'EOF' -/etc/exim4/my.conf +/etc/exim4/nn-mainlog.conf EOF ;; *) @@ -3561,7 +3561,7 @@ EOF # defaults but no queue runner and alternate config dir QUEUERUNNER='no' COMMONOPTIONS='-oP /run/exim4/eximin.pid' -UPEX4OPTS='-d /etc/myexim4' +UPEX4OPTS='-d /etc/nond-exim4' EOF echo bk.b8.nz > /etc/mailname @@ -3721,16 +3721,16 @@ case $HOSTNAME in m rsync -ra --delete --delete-excluded \ --exclude=/conf.d/router/161_backup_redir_nn \ --exclude=/conf.d/router/186_sentarchive_nn \ - --exclude=/conf.d/main/000_local-nn /etc/exim4/ /etc/myexim4 - cat >>/etc/myexim4/conf.d/main/000_local <<'EOF' + --exclude=/conf.d/main/000_local-nn /etc/exim4/ /etc/nond-exim4 + cat >>/etc/nond-exim4/conf.d/main/000_local <<'EOF' # this makes it easier to see which exim is doing what -log_file_path = /var/log/exim4/my%s +log_file_path = /var/log/exim4/nond%s EOF cat >/etc/logrotate.d/myexim <<'EOF' -/var/log/exim4/mymain /var/log/exim4/myreject { +/var/log/exim4/nondmain /var/log/exim4/nondreject { daily missingok rotate 1000 @@ -3738,7 +3738,7 @@ EOF notifempty nocreate } -/var/log/exim4/mypanic { +/var/log/exim4/nondpanic { size 10M missingok rotate 10 @@ -3752,9 +3752,9 @@ EOF # If we ever wanted to have a separate spool, # we could do it like this. # cat >>/etc/exim4/conf.d/main/000_local-nn <<'EOF' - # spool_directory = /var/spool/myexim4 + # spool_directory = /var/spool/nond-exim4 # EOF - cat >>/etc/myexim4/update-exim4.conf.conf <<'EOF' + cat >>/etc/nond-exim4/update-exim4.conf.conf <<'EOF' dc_eximconfig_configtype='smarthost' dc_smarthost='nn.b8.nz' EOF @@ -3762,14 +3762,14 @@ EOF bk) # config for the non-nn exim - cat >>/etc/myexim4/conf.d/main/000_local <<'EOF' + cat >>/etc/nond-exim4/conf.d/main/000_local <<'EOF' MAIN_HARDCODE_PRIMARY_HOSTNAME = mail2.iankelling.org EOF ;; $MAIL_HOST) - u /etc/myexim4/conf.d/router/185_sentarchive <<'EOF' + u /etc/nond-exim4/conf.d/router/185_sentarchive <<'EOF' sentarchive: driver = redirect domains = ! +local_domains @@ -3779,7 +3779,7 @@ sentarchive: unseen EOF - u /etc/myexim4/conf.d/router/160_backup_redir <<'EOF' + u /etc/nond-exim4/conf.d/router/160_backup_redir <<'EOF' backup_redir: driver = redirect # i dont email myself from my own machine much, so lets ignore that. @@ -3796,7 +3796,7 @@ backup_redir: EOF # for bk, we have a exim4in.service that will do this for us. - m update-exim4.conf -d /etc/myexim4 + m update-exim4.conf -d /etc/nond-exim4 ;; esac diff --git a/subdir_files/.local/share/konsole/profileian.profile b/subdir_files/.local/share/konsole/profileian.profile index 33baf40..4063026 100644 --- a/subdir_files/.local/share/konsole/profileian.profile +++ b/subdir_files/.local/share/konsole/profileian.profile @@ -3,13 +3,29 @@ ColorScheme=ianktheme Font=Noto Mono,12,-1,5,50,0,0,0,0,0 [General] +AlternatingBackground=0 +AlternatingBars=0 +ErrorBackground=2 LocalTabTitleFormat=%w Name=profileian Parent=FALLBACK/ RemoteTabTitleFormat=%w +SemanticHints=2 +SemanticInputClick=true +SemanticUpDown=false + +[Interaction Options] +OpenLinksByDirectClickEnabled=true +TextEditorCmd=6 +TextEditorCmdCustom=/a/exe/g +LINE:COLUMN PATH +UnderlineFilesEnabled=true +WordCharacters=@-./_~?&=%+# [Keyboard] KeyBindings=ian [Scrolling] HistorySize=100000 + +[Terminal Features] +UrlHintsModifiers=0 diff --git a/system-status b/system-status index 745e335..34ad07a 100755 --- a/system-status +++ b/system-status @@ -290,8 +290,8 @@ write-status() { # shellcheck disable=SC2016 # exim var, not a bash bar if (( $(date -d "$(exim -Mset $mid -be <<<'$h_date:' | sed -n 's/^> *//;/./p')" +%s) < EPOCHSECONDS )); then if ip a show veth0-mail &>/dev/null; then - pid=$(pgrep -f "/usr/sbin/exim4 -bd -q30m -C /etc/exim4/my.conf"|head -n1); - nsenter -t $pid -n -m /usr/sbin/exim4 -C /etc/exim4/my.conf -M $mid + pid=$(pgrep -f "/usr/sbin/exim4 -bd -q30m -C /etc/exim4/nn-mainlog.conf"|head -n1); + nsenter -t $pid -n -m /usr/sbin/exim4 -C /etc/exim4/nn-mainlog.conf -M $mid else /usr/sbin/exim4 -M $mid fi -- 2.30.2