From: Ian Kelling Date: Fri, 14 Jun 2024 13:58:08 +0000 (-0400) Subject: emacs update. improvements X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=ee27d59f1eea7a83b1764ec41bfb3015bb463a26;p=distro-setup emacs update. improvements --- diff --git a/brc b/brc index 4aacc47..17fcfd8 100644 --- a/brc +++ b/brc @@ -1324,7 +1324,11 @@ etailm() { etail2() { tail -F /var/log/exim4/mymain -n 200 "$@" } -ccomp tail etail etail2 +# shortcut +ta() { + tail -F "$@" +} +ccomp tail etail etail2 ta # ran into this online, trying it out detach() { @@ -1639,28 +1643,17 @@ g() { args+=" -c" fi fi - if [[ $EMACSDIR ]]; then - - # todo: we don't have to alter HOME since emacs 29+, we can set - # user-emacs-directory with the flag --init-directory - - # Alter the path here, otherwise the nfs mount gets triggered on the - # first path lookup when emacs is not being used. - # shellcheck disable=SC2098 disable=SC2097 # false positive - PATH="$EMACSDIR/lib-src:$EMACSDIR/src:$PATH" EHOME=$HOME HOME=$EMACSDIR m emacsclient -a "" $args "$@" + 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 - 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 + m emacsclient -a "" $args "$@" fi } diff --git a/distro-end b/distro-end index 5378579..fd4df9b 100755 --- a/distro-end +++ b/distro-end @@ -764,11 +764,16 @@ EOF pup --allow-downgrades fi # system76-driver: on a modern kernel, it seems to mainly just do - # some power settings, I haven't looked entirely through it. it - # might also change fan speed. Of its recommended packages, - # system76-power is the only one I haven't looked at, the others - # do nothing for laptops i have. they have models hardcoded in - # source, so you can just grep for it. pkx package; caf | less. + # some power settings, I haven't looked entirely through it. Of + # its recommended packages, system76-power is the only one I + # haven't looked at, the others do nothing for laptops i + # have. they have models hardcoded in source, so you can just grep + # for it. pkx package; caf | less. I'm rather annoyed that + # com.system76.PowerDaemon.service is regularly taking up the + # most power. I wonder what it is actually doing, it really + # doesn't say, just has cryptic messages when I turn on + # debug logs, and has no documentation. Similar deal with + # system76-driver.service. # # if you get a notice about a firmware update, the notifier on i3 # is too dumb to do anything when you click it. diff --git a/i3-abrowser b/i3-abrowser index 83c216a..8c5a208 100755 --- a/i3-abrowser +++ b/i3-abrowser @@ -50,7 +50,7 @@ if i3-msg -t get_tree | jq --stream -r 'select(.[1]|scalars!=null) | "\(.[0]|joi if [[ $cur_workspace == 2 && $h ]]; then i3-msg "swap container with mark abrowser; [con_mark=\"abrowser\"] focus" else - i3-msg '[con_mark="abrowser"] move workspace current' + i3-msg "[con_mark=\"abrowser\"] focus" fi else diff --git a/i3-emacs b/i3-emacs index f3eb116..bc38310 100755 --- a/i3-emacs +++ b/i3-emacs @@ -32,7 +32,7 @@ if [[ $id ]]; then if [[ $cur_workspace == 2 && $h ]]; then i3-msg "swap container with con_id $id; [con_id=\"$id\"] focus" else - i3-msg '[con_id="'$id'"] move workspace current' + i3-msg "[con_id=\"$id\"] focus" fi else diff --git a/i3-konsole b/i3-konsole index 9aa27d5..74fd2c2 100755 --- a/i3-konsole +++ b/i3-konsole @@ -35,7 +35,7 @@ if i3-msg -t get_tree | jq --stream -r 'select(.[1]|scalars!=null) | "\(.[0]|joi if [[ $cur_workspace == 2 && $h ]]; then i3-msg "swap container with mark term; [con_mark=\"term\"] focus" else - i3-msg '[con_mark="term"] move workspace current' + i3-msg "[con_mark=\"term\"] focus" fi else i3-split-maybe diff --git a/prof b/prof index 9cc5880..4fa705b 100644 --- a/prof +++ b/prof @@ -28,7 +28,7 @@ dossh=true if (( $# >= 1 )); then remote=$1 else - remote=b8.nz + remote=prof if systemctl --user --quiet is-active profanity || [[ $HOSTNAME == kd ]]; then dossh=false fi