From: Ian Kelling Date: Wed, 1 Jul 2026 10:31:33 +0000 (-0400) Subject: minor improvements X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=2a8e199064e68d06348fffb5a15f00f4bb30c4f8;p=distro-setup minor improvements --- diff --git a/brc2 b/brc2 index c0cac14..9f43626 100644 --- a/brc2 +++ b/brc2 @@ -5124,7 +5124,7 @@ mnt-df() { local f mnts cd /mnt; mnts=$(for f in *; do if mountpoint -q $f; then e $f; fi; done) - df -h $mnts | awk '{printf "%8s %12s\n", $4,$NF}' | sort -hr + df -h $mnts | tail -n+2 | awk '{printf "%8s %12s\n", $4,$NF}' | sort -hr } lazywrites() { diff --git a/distro-end b/distro-end index 1b66a78..488075c 100755 --- a/distro-end +++ b/distro-end @@ -2189,7 +2189,6 @@ esac # todo: enable frodo specific backup timers here # misc -sgo hist-catcher # console font size if [[ $HOSTNAME == sf ]] && ! grep -q '^FONTFACE="TER"' /etc/default/console-setup; then diff --git a/filesystem/usr/local/bin/check-stale-alerts b/filesystem/usr/local/bin/check-stale-alerts index da50261..9de27f2 100755 --- a/filesystem/usr/local/bin/check-stale-alerts +++ b/filesystem/usr/local/bin/check-stale-alerts @@ -57,4 +57,4 @@ done # for .prom.$PID files, they will naturally exist when # scripts like system-status get killed on reboot. # Just clean them up here. -find /var/lib/prometheus/node-exporter -name '*[0-9]' -type f -mtime 9 -delete +find /var/lib/prometheus/node-exporter -name '*[0-9]' -type f -mtime +9 -delete diff --git a/filesystem/usr/local/bin/i3-emacs b/filesystem/usr/local/bin/i3-emacs index 18eddd5..8e539c7 100755 --- a/filesystem/usr/local/bin/i3-emacs +++ b/filesystem/usr/local/bin/i3-emacs @@ -23,7 +23,7 @@ # If there are more than one, just get the 1st one. There is probably # some better behavior to do in that case, but atm I don't want to think # about it. -id=$(i3-msg -t get_tree | jq -e '.. | select(.name?) | select(.name | test("^e-iak ")).id'| sort -n| head -n1) +id=$(i3-msg -t get_tree | jq -e '.. | select(.name?) | select(.name | test("^e-server ")).id'| sort -n| head -n1) if [[ $id ]]; then i3-msg "[con_id=\"$id\"] focus" diff --git a/g-lib.sh b/g-lib.sh index 7fb15d9..54acd6b 100755 --- a/g-lib.sh +++ b/g-lib.sh @@ -20,22 +20,30 @@ g() { local args gdb=false server="$1" shift + local new_frame_workspace create_frame=false + + # special arg for some scripts. must come first. + if [[ $1 == --i3ws=[0-9]* ]]; then + new_frame_workspace=${1#--i3ws=} + shift + fi if [[ $DISPLAY ]]; then args=-n fi if (( $# == 0 )); then + create_frame=true args+=" -c" fi if [[ $server == none ]]; then server= - else - args+=" -s $server" + else + args+=" -s$server" fi - id=$(i3-msg -t get_tree | jq -e '.. | select(.name?) | select(.name | test("^e-'$server'iak ")).id'| sort -n| head -n1) + id=$(i3-msg -t get_tree | jq -e '.. | select(.name?) | select(.name | test("^e-'$server' ")).id'| sort -n| head -n1) if [[ ! $id ]]; then if (( $# == 0 )) && type -p gdb &>/dev/null; then @@ -43,7 +51,7 @@ g() { #gdb=true : else - # duplicate arg, but oh well. + create_frame=true args+=" -c" fi fi @@ -60,6 +68,9 @@ g() { # shellcheck disable=SC2103 # preference for simplicity. cd - else + if $create_frame && [[ $new_frame_workspace ]]; then + i3-msg "workspace $new_frame_workspace" + fi emacsclient -a "" $args "$@" fi } diff --git a/i3-sway/common.conf b/i3-sway/common.conf index 4605376..f8bdc7b 100644 --- a/i3-sway/common.conf +++ b/i3-sway/common.conf @@ -230,4 +230,3 @@ client.focused #4c7899 #285577 #ffffff #2e9ef4 #ff4400 client.focused_inactive #333333 #5f676a #ffffff #484e50 #B8C8CD client.unfocused #333333 #222222 #888888 #292d2e #B8C8CD -assign [instance="mpv-i3-ws6"] 6 diff --git a/mail-setup b/mail-setup index 613e7db..971ec5c 100755 --- a/mail-setup +++ b/mail-setup @@ -477,7 +477,7 @@ fi bhost_t=false case $HOSTNAME in $MAIL_HOST) : ;; - kd|x2|x3|kw|sy|so|frodo) + kd|x2|x3|kw|sf|sy|so|frodo) bhost_t=true ;; esac diff --git a/subdir_files/.local/share/kxmlgui5/konsole/sessionui.rc b/subdir_files/.local/share/kxmlgui5/konsole/sessionui.rc index 9faefbf..09c721e 100644 --- a/subdir_files/.local/share/kxmlgui5/konsole/sessionui.rc +++ b/subdir_files/.local/share/kxmlgui5/konsole/sessionui.rc @@ -83,11 +83,11 @@ - - - - - - + + + + + +